summaryrefslogtreecommitdiff
path: root/drivers/phy/broadcom
AgeCommit message (Collapse)Author
2020-05-18drivers: phy: sr-usb: do not use internal fsm for USB2 phy initBharat Gooty
During different reboot cycles, USB PHY PLL may not always lock during initialization and therefore can cause USB to be not usable. Hence do not use internal FSM programming sequence for the USB PHY initialization. Fixes: 4dcddbb38b64 ("phy: sr-usb: Add Stingray USB PHY driver") Signed-off-by: Bharat Gooty <bharat.gooty@broadcom.com> Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com> Link: https://lore.kernel.org/r/20200513173947.10919-1-rayagonda.kokatanur@broadcom.com Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2020-05-18phy: phy-bcm-ns2-usbdrd: Constify phy_opsRikard Falkeborn
phy_ops are never modified and can therefore be made const to allow the compiler to put it in read-only memory. Before: text data bss dec hex filename 7831 3144 128 11103 2b5f drivers/phy/broadcom/phy-bcm-ns2-usbdrd.o After: text data bss dec hex filename 7959 3016 128 11103 2b5f drivers/phy/broadcom/phy-bcm-ns2-usbdrd.o Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Link: https://lore.kernel.org/r/20200516120441.7627-2-rikard.falkeborn@gmail.com Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2020-05-18phy: phy-brcm-usb: Constify static structsRikard Falkeborn
A number of structs were not modified and can therefore be made const to allow the compiler to put them in read-only memory. In order to do so, update a few functions that don't modify there input to take pointers to const. Before: text data bss dec hex filename 15511 6448 64 22023 5607 drivers/phy/broadcom/phy-brcm-usb.o After: text data bss dec hex filename 16058 5936 64 22058 562a drivers/phy/broadcom/phy-brcm-usb.o Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Link: https://lore.kernel.org/r/20200516120441.7627-4-rikard.falkeborn@gmail.com Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2020-05-18phy: sr-usb: Constify phy_opsRikard Falkeborn
phy_ops are never modified and can therefore be made const to allow the compiler to put it in read-only memory. Before: text data bss dec hex filename 4310 1244 0 5554 15b2 drivers/phy/broadcom/phy-bcm-sr-usb.o After: text data bss dec hex filename 4438 1116 0 5554 15b2 drivers/phy/broadcom/phy-bcm-sr-usb.o Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Link: https://lore.kernel.org/r/20200516120441.7627-3-rikard.falkeborn@gmail.com Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2020-02-21phy: brcm-sata: Correct MDIO operations for 40nm platformsFlorian Fainelli
The logic to write to MDIO registers on 40nm platforms was wrong because it would use the port number as an offset from the base address rather than the bank address of the PHY. This is hardly noticeable because the only programming we do is enabling SSC or not, which is not really causing an observable functional change. Correct that mistake by passing down the struct brcm_sata_port structure down to the brcm_sata_mdio_wr() and brcm_sata_mdio_rd() functions and do the proper offsetting for 28nm, respectively 40nm platforms from there. This means that brcm_sata_pcb_base() is now useless and is therefore removed. Fixes: c1602a1a0fbe ("phy: phy_brcmstb_sata: add support for MIPS-based platforms") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2020-01-14phy: Enable compile testing for some of driversKrzysztof Kozlowski
Some of the phy drivers can be compile tested to increase build coverage. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2020-01-08phy: usb: Add support for wake and USB low power mode for 7211 S2/S5Al Cooper
Add support for 7211 USB wake. Disable all possible 7211 USB logic for S2/S5 if USB wake is not enabled. On the 7211, the XHCI wake signal was not connected properly and only goes to the USB1_USB1_CTRL_TP_DIAG1 diagonstic register. The workaround is to have VPU code running that polls for the proper bit in the DIAG register and to wake the system when the bit is asserted. Signed-off-by: Al Cooper <alcooperx@gmail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2020-01-08phy: usb: USB driver is crashing during S3 resume on 7216Al Cooper
This is a result of the USB 2.0 clocks not being disabled/enabled during suspend/resume on XHCI only systems. Signed-off-by: Al Cooper <alcooperx@gmail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2020-01-08phy: usb: bdc: Fix occasional failure with BDC on 7211Al Cooper
The BDC "Read Transaction Size" needs to be changed from 1024 bytes to 256 bytes to prevent occasional transaction failures. Signed-off-by: Al Cooper <alcooperx@gmail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2020-01-08phy: usb: PHY's MDIO registers not accessible without device installedAl Cooper
When there is no device connected and FSM is enabled, the XHCI puts the PHY into suspend mode. When the PHY is put into suspend mode the USB LDO powers down the PHY. This causes the MDIO to be inaccessible and its registers reset to default. The fix is to disable FSM. Signed-off-by: Al Cooper <alcooperx@gmail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2020-01-08phy: usb: fix driver to defer on clk_get deferAl Cooper
Handle defer on clk_get because the new SCMI clock driver comes up after this driver. Signed-off-by: Al Cooper <alcooperx@gmail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2020-01-08phy: usb: Add support for new Synopsys USB controller on the 7211b0Al Cooper
The 7211b0 has added the STB XHCI Synopsys controller and it will be used instead of the RPi based DWC USB controller. The new Synopsys XHCI controller core is the same one that is used on the 7216, but because of the way the STB USB PHY is used on both the A0 and B0, some of the PHY control is different. Signed-off-by: Al Cooper <alcooperx@gmail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2020-01-08phy: usb: Add support for new Synopsys USB controller on the 7216Al Cooper
The 7216 has the new USB XHCI controller from Synopsys. While this new controller and the PHY are similar to the STB versions, the major differences are: - Many of the registers and fields in the CTRL block have been removed or changed. - A new set of Synopsys control registers, BCHP_USB_XHCI_GBL, were added. - MDIO functionality has been replaced with direct access registers in the BCHP_USB_XHCI_GBL block. - Power up PHY defaults that had to be changed by MDIO in previous chips will now power up with the correct defaults. A new init module was created for this new Synopsys USB controller. A new compatible string was added and the driver will dispatch into one of two init modules based on it. A "reg-names" field was added so the driver can more easily get optional registers. A DT bindings document was also added for this driver. Signed-off-by: Al Cooper <alcooperx@gmail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2020-01-08phy: usb: Restructure in preparation for adding 7216 USB supportAl Cooper
The driver is being restructured in preparation for adding support for the new Synopsys USB conroller on the 7216. Since all the bugs and work-arounds in previous STB chips are supposed to be fixed, most of the code in phy-brcm-usb-init.c is not needed. Instead of adding more complexity to the already complicated phy-brcm-usb-init.c module, the driver will be restructured to use a vector table to dispatch into different C modules for the different controllers. There was also some general cleanup done including some ipp setup code that was incorrect. Signed-off-by: Al Cooper <alcooperx@gmail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2020-01-08phy: usb: Add "wake on" functionalityAl Cooper
Add the ability to handle USB wake events from USB devices when in S2 mode. Typically there is some additional configuration needed to tell the USB device to generate the wake event when suspended but this varies with the different USB device classes. For example, on USB Ethernet dongles, ethtool should be used to enable the magic packet wake functionality in the dongle. NOTE: This requires that the "power/wakeup" sysfs entry for the USB device generating the wakeup be set to "enabled". This functionality requires a special hardware sideband path that will trigger the AON_PM_L2 interrupt needed to wake the system from S2 even though the USB host controllers are in IDDQ (low power state) and most USB related clocks are shut off. For the sideband signaling to work we need to leave the usbx_freerun clock running, but this clock consumes very little power by design. There's a bug in the XHCI wake hardware so only EHCI/OHCI wake is currently supported. Signed-off-by: Al Cooper <alcooperx@gmail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2020-01-08phy: usb: Put USB phys into IDDQ on suspend to save power in S2 modeAl Cooper
Currently the Phy driver will put the USB phys into the max power saving mode (IDDQ) when there is no corresponding XHCI, EHCI or OHCI client (through rmmod, unbind or if the driver is not builtin). This change will also put the Phys into IDDQ mode on suspend so that S2 will get the additional power savings. Signed-off-by: Al Cooper <alcooperx@gmail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2020-01-08phy: usb: Get all drivers that use USB clks using correct enable/disableAl Cooper
The BRCM USB Phy, ohci, ehci and xhci drivers all use the USB clocks but not all drivers use the clk_prepare_enable/clk_disable_unprepare versions to enable/disable the clocks. This change gets all drivers using the prepare version. Signed-off-by: Al Cooper <alcooperx@gmail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2020-01-08phy: usb: EHCI DMA may lose a burst of DMA data for 7255xA0 familyAl Cooper
When the EHCI controller received a 512 byte USB packet that had to be broken into 2 256 byte bursts across the SCB bus AND there was a following 512 byte USB packet, the second burst of data from the first packet was sometimes being lost. If the burst size was changed to 128 bytes via the EBR_SCB_SIZE field in the USB_CTRL_EBRIDGE register we'd see the 4th 128 byte burst of the first packet being lost. This problem became much worse if other threads were running that accessed memory, like a memcpy test. Setting the EBR_SCB_SIZE to 512, which prevents breaking the EHCI USB packet (max size of 512 bytes) into bursts, fixed the problem. Signed-off-by: Al Cooper <alcooperx@gmail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2020-01-08phy: brcm-sata: Implement 7216 initialization sequenceFlorian Fainelli
7216 is a 16nm process chip with a slightly different version of the PHY SerdDeS/AFE that requires a specific tuning sequence. Key on the compatible string to perform that initialization. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2019-10-23phy: phy-brcm-usb-init: fix use of integer as pointerBen Dooks
The xhci_ec_base variable is a pointer, so don't compare it with an integer. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Reviewed-by: Andrew Murray <andrew.murray@arm.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2019-10-23phy: phy-brcm-usb-init: fix __iomem annotationsBen Dooks
The register address should have __iomem attributes so fix this to remove the following sparse warnings: drivers/phy/broadcom/phy-brcm-usb-init.c:459:30: warning: cast removes address space '<asn:2>' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:459:30: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:459:30: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:459:30: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:461:30: warning: cast removes address space '<asn:2>' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:461:30: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:461:30: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:461:30: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:465:30: warning: cast removes address space '<asn:2>' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:465:30: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:465:30: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:465:30: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:469:30: warning: cast removes address space '<asn:2>' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:469:30: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:469:30: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:469:30: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:478:30: warning: cast removes address space '<asn:2>' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:478:30: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:478:30: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:478:30: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:480:30: warning: cast removes address space '<asn:2>' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:480:30: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:480:30: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:480:30: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:485:30: warning: cast removes address space '<asn:2>' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:485:30: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:485:30: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:485:30: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:494:9: warning: cast removes address space '<asn:2>' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:494:9: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:494:9: expected void [noderef] <asn:2> *reg drivers/phy/broadcom/phy-brcm-usb-init.c:494:9: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:495:9: warning: cast removes address space '<asn:2>' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:495:9: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:495:9: expected void [noderef] <asn:2> *reg drivers/phy/broadcom/phy-brcm-usb-init.c:495:9: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:498:9: warning: cast removes address space '<asn:2>' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:498:9: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:498:9: expected void [noderef] <asn:2> *reg drivers/phy/broadcom/phy-brcm-usb-init.c:498:9: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:501:9: warning: cast removes address space '<asn:2>' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:501:9: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:501:9: expected void [noderef] <asn:2> *reg drivers/phy/broadcom/phy-brcm-usb-init.c:501:9: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:613:9: warning: cast removes address space '<asn:2>' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:613:9: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:613:9: expected void [noderef] <asn:2> *reg drivers/phy/broadcom/phy-brcm-usb-init.c:613:9: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:640:9: warning: cast removes address space '<asn:2>' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:640:9: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:640:9: expected void [noderef] <asn:2> *reg drivers/phy/broadcom/phy-brcm-usb-init.c:640:9: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: warning: incorrect type in assignment (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: expected void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: got void [noderef] <asn:2> * drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:710:64: warning: Using plain integer as NULL pointer drivers/phy/broadcom/phy-brcm-usb-init.c:712:32: warning: cast removes address space '<asn:2>' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:712:32: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:712:32: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:712:32: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:713:29: warning: cast removes address space '<asn:2>' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:713:29: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:713:29: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:713:29: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:717:29: warning: cast removes address space '<asn:2>' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:717:29: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:717:29: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:717:29: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:720:9: warning: cast removes address space '<asn:2>' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:720:9: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:720:9: expected void [noderef] <asn:2> *reg drivers/phy/broadcom/phy-brcm-usb-init.c:720:9: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:721:9: warning: cast removes address space '<asn:2>' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:721:9: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:721:9: expected void [noderef] <asn:2> *reg drivers/phy/broadcom/phy-brcm-usb-init.c:721:9: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: warning: incorrect type in assignment (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: expected void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: got void [noderef] <asn:2> * drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: warning: incorrect type in assignment (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: expected void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: got void [noderef] <asn:2> * drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: warning: incorrect type in assignment (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: expected void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: got void [noderef] <asn:2> * drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: warning: incorrect type in assignment (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: expected void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: got void [noderef] <asn:2> * drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: warning: incorrect type in assignment (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: expected void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: got void [noderef] <asn:2> * drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: warning: incorrect type in assignment (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: expected void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: got void [noderef] <asn:2> * drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:794:29: warning: cast removes address space '<asn:2>' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:794:29: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:794:29: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:794:29: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:813:29: warning: cast removes address space '<asn:2>' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:813:29: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:813:29: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:813:29: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:829:37: warning: cast removes address space '<asn:2>' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:829:37: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:829:37: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:829:37: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:843:37: warning: cast removes address space '<asn:2>' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:843:37: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:843:37: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:843:37: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:847:37: warning: cast removes address space '<asn:2>' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:847:37: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:847:37: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:847:37: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: warning: incorrect type in assignment (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: expected void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: got void [noderef] <asn:2> * drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: warning: incorrect type in assignment (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: expected void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: got void [noderef] <asn:2> * drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: warning: incorrect type in assignment (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: expected void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: got void [noderef] <asn:2> * drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:878:9: warning: cast removes address space '<asn:2>' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:878:9: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:878:9: expected void [noderef] <asn:2> *reg drivers/phy/broadcom/phy-brcm-usb-init.c:878:9: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:880:29: warning: cast removes address space '<asn:2>' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:880:29: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:880:29: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:880:29: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:896:29: warning: cast removes address space '<asn:2>' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:896:29: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:896:29: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:896:29: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:901:37: warning: cast removes address space '<asn:2>' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:901:37: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:901:37: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:901:37: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:905:37: warning: cast removes address space '<asn:2>' of expression drivers/phy/broadcom/phy-brcm-usb-init.c:905:37: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:905:37: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:905:37: got void * drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: warning: incorrect type in assignment (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: expected void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: got void [noderef] <asn:2> * drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: warning: incorrect type in assignment (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: expected void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: got void [noderef] <asn:2> * drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:423:38: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:423:52: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: warning: incorrect type in assignment (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: expected void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: got void [noderef] <asn:2> * drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: warning: incorrect type in assignment (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: expected void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:434:13: got void [noderef] <asn:2> * drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: warning: incorrect type in argument 1 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:435:38: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: warning: incorrect type in argument 2 (different address spaces) drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: expected void [noderef] <asn:2> *addr drivers/phy/broadcom/phy-brcm-usb-init.c:435:51: got void *reg drivers/phy/broadcom/phy-brcm-usb-init.c:422:13: warning: too many warnings Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2019-07-01Merge tag 'phy-for-5.3' of ↵Greg Kroah-Hartman
git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-next phy: for 5.3 *) Add a new PHY driver for Qualcomm PCIe2 PHY *) Add a new PHY driver for Mixel DPHY present in i.MX8 *) Fix Qualcomm QMP UFS PHY driver from incorrectly reporting that PHY enable failed *) Fix _BUG_ on Amlogic G12A USB3 + PCIE Combo PHY Driver due to calling a sleeping function from invalid context *) Fix WARN_ON dump on rcar-gen3-usb2 PHY driver caused due to imbalance powered flag *) Fix .cocci and sparse warnings Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> * tag 'phy-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy: phy: qcom-qmp: Raise qcom_qmp_phy_enable() polling delay phy: meson-g12a-usb3-pcie: disable locking for cr_regmap phy: Add driver for mixel mipi dphy found on NXP's i.MX8 SoCs dt-bindings: phy: Add documentation for mixel dphy dt-bindings: phy-pxa-usb: add bindings phy: renesas: rcar-gen3-usb2: fix imbalance powered flag phy: qcom-qmp: Drop useless msm8998_pciephy_cfg setting phy: qcom-qmp: Correct READY_STATUS poll break condition phy: ti: am654-serdes: Make serdes_am654_xlate() static phy: usb: phy-brcm-usb: Fix platform_no_drv_owner.cocci warnings phy: samsung: Use struct_size() in devm_kzalloc() phy: qcom: Add Qualcomm PCIe2 PHY driver dt-bindings: phy: Add binding for Qualcomm PCIe2 PHY
2019-07-01Merge tag 'phy-for-5.2-rc_v2' of ↵Greg Kroah-Hartman
git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-next Kishon writes: phy: for 5.2-rc *) Move Tegra124 PLL power supplies to be enabled by xusb-tegra124 *) Move Tegra210 PLL power supplies to be enabled by xusb-tegra210 *) Minor fixes: fix memory leaks at error path and addresses coverity. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> * tag 'phy-for-5.2-rc_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy: phy: tegra: xusb: Add Tegra210 PLL power supplies phy: tegra: xusb: Add Tegra124 PLL power supplies dt-bindings: phy: tegra-xusb: List PLL power supplies phy: usb: phy-brcm-usb: Remove sysfs attributes upon driver removal phy: renesas: rcar-gen2: Fix memory leak at error paths phy: qcom-qusb2: fix missing assignment of ret when calling clk_prepare_enable
2019-06-20phy: usb: phy-brcm-usb: Fix platform_no_drv_owner.cocci warningsYueHaibing
Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2019-06-19treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500Thomas Gleixner
Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-12phy: usb: phy-brcm-usb: Remove sysfs attributes upon driver removalFlorian Fainelli
We are not destroying the sysfs attribute groupe we registered during the probe function which will make subsequent probe calls to that driver fail. Correct that with adding a remove function which only removes those attributes since the reference counting on clocks did its job already. Fixes: 415060b21f31 ("phy: usb: phy-brcm-usb: Add ability to force DRD mode to host or device") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2019-06-05treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282Thomas Gleixner
Based on 1 normalized pattern(s): this software is licensed under the terms of the gnu general public license version 2 as published by the free software foundation and may be copied distributed and modified under those terms this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 285 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190529141900.642774971@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-24treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 118Thomas Gleixner
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 or at your option any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 44 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Richard Fontana <rfontana@redhat.com> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190523091651.032047323@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-21treewide: Add SPDX license identifier - Makefile/KconfigThomas Gleixner
Add SPDX license identifiers to all Make/Kconfig files which: - Have no license information of any form These files fall under the project license, GPL v2 only. The resulting SPDX license identifier is: GPL-2.0-only Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-17phy: sr-usb: Add Stingray USB PHY driverSrinath Mannam
USB PHY driver supports two types of stingray USB PHYs - Type 1 is a combo PHY contains two PHYs, one SS and one HS. - Type 2 is a single HS PHY. These two PHY versons support both Generic xHCI host controller driver and BDC Broadcom device controller driver. Signed-off-by: Srinath Mannam <srinath.mannam@broadcom.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2019-02-07phy: bcm-sr-pcie: Change operation when PIPEMUX=1Qingmin Liu
When PIPEMIX=1, change the operation from 2x8 EP to 1x8 EP + 1x8 RC. Signed-off-by: Qingmin Liu <qingmin.liu@broadcom.com> Signed-off-by: Ray Jui <ray.jui@broadcom.com> Acked-by: Scott Branden <scott.branden@broadcom.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2018-09-25phy: brcm-sata: Add BCM63138 (DSL) PHY init sequenceFlorian Fainelli
The BCM63138 SATA PHY requires a special initialization sequence in order to operate correctly, mostly tuning incorrect default values. Implement that sequence and match the documented compatible string as an entry point into that sequence. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2018-09-25phy: brcm-sata: allow PHY_BRCM_SATA driver to be built for DSL SoCsFlorian Fainelli
Broadcom ARM-based DSL SoCs (BCM63xx product line) have the same Broadcom SATA PHY that other SoCs are using, make it possible to select that driver on these platforms. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2018-09-25phy: Convert to using %pOFn instead of device_node.nameRob Herring
In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier. Cc: Kishon Vijay Abraham I <kishon@ti.com> Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2018-09-10phy:phy-brcm-usb: Use PTR_ERR_OR_ZERO to replace the open coded versionzhong jiang
PTR_ERR_OR_ZERO has implemented the if(IS_ERR(...)) + PTR_ERR, So just replace them rather than duplicating its implement. Signed-off-by: zhong jiang <zhongjiang@huawei.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2018-07-30Merge 4.18-rc7 into usb-nextGreg Kroah-Hartman
We want the USB fixes in here as well to handle merge issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-10phy: bcm-sr-pcie: Add Stingray PCIe PHY driverRay Jui
Add Stingray PCIe PHY driver for both PAXB and PAXC root complex Signed-off-by: Ray Jui <ray.jui@broadcom.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2018-06-29phy: phy-brcm-usb-init: Fix power down USB 3.0 PHY when XHCI reenabledJaedon Shin
Unset is required to enable USB 3.0 PHY when XHCI reenabled in response to setting PHY3_IDDQ_OVERRIDE in uninit(). Fixes: cd6f769fdea7 ("phy: phy-brcm-usb-init: Power down USB 3.0 PHY when XHCI disabled") Signed-off-by: Jaedon Shin <jaedon.shin@gmail.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2018-02-01Merge tag 'usb-4.16-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB/PHY updates from Greg KH: "Here is the big USB and PHY driver update for 4.16-rc1. Along with the normally expected XHCI, MUSB, and Gadget driver patches, there are some PHY driver fixes, license cleanups, sysfs attribute cleanups, usbip changes, and a raft of other smaller fixes and additions. Full details are in the shortlog. All of these have been in the linux-next tree for a long time with no reported issues" * tag 'usb-4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (137 commits) USB: serial: pl2303: new device id for Chilitag USB: misc: fix up some remaining DEVICE_ATTR() usages USB: musb: fix up one odd DEVICE_ATTR() usage USB: atm: fix up some remaining DEVICE_ATTR() usage USB: move many drivers to use DEVICE_ATTR_WO USB: move many drivers to use DEVICE_ATTR_RO USB: move many drivers to use DEVICE_ATTR_RW USB: misc: chaoskey: Use true and false for boolean values USB: storage: remove old wording about how to submit a change USB: storage: remove invalid URL from drivers usb: ehci-omap: don't complain on -EPROBE_DEFER when no PHY found usbip: list: don't list devices attached to vhci_hcd usbip: prevent bind loops on devices attached to vhci_hcd USB: serial: remove redundant initializations of 'mos_parport' usb/gadget: Fix "high bandwidth" check in usb_gadget_ep_match_desc() usb: gadget: compress return logic into one line usbip: vhci_hcd: update 'status' file header and format USB: serial: simple: add Motorola Tetra driver CDC-ACM: apply quirk for card reader usb: option: Add support for FS040U modem ...
2018-01-18phy: brcm-sata: remove unused variableArnd Bergmann
The newly introduced calibrate function has a variable that has never been used and needs to be removed to avoid this harmless warning: drivers/phy/broadcom/phy-brcm-sata.c: In function 'brcm_stb_sata_calibrate': drivers/phy/broadcom/phy-brcm-sata.c:514:24: error: unused variable 'priv' [-Werror=unused-variable] Fixes: 3e507769d15e ("phy: brcm-sata: Implement calibrate callback") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Tejun Heo <tj@kernel.org>
2018-01-17phy: brcm-sata: fix semicolon.cocci warningsFengguang Wu
drivers/phy/broadcom/phy-brcm-sata.c:534:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: 3e507769d15e ("phy: brcm-sata: Implement calibrate callback") CC: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2018-01-17phy: brcm-sata: Implement calibrate callbackFlorian Fainelli
Implement the calibration callback to allow turning on the Clock-Data Recovery module clamping when necessary, e.g: during failure to identify a SATA hard drive from ahci_brcm.c::brcm_ahci_read_id. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2017-12-29phy: phy-brcm-usb-init: DRD mode can cause crash on startupAl Cooper
This is caused by a bug in the BDC core. When the BDC core comes out of reset and it's not selected, it gets a backup clock. When the BDC core is selected, it get's the main clock. If HOST mode is then selected the BDC core has the main clock shut off but the backup clock is not restored. The failure scenario and cause are as follows: - DRD mode is active - Device mode is selected first in bootloader - When host mode is now selected, the clock to the BDC is cut off. - BDC registers are inaccessible and therefore the BDC driver crashes upon Linux boot. The fix is to have the phy driver always force a BDC reset on startup. Fixes: 49859e55e364 ("phy: usb: phy-brcm-usb: Add Broadcom STB USB phy driver") Signed-off-by: Al Cooper <alcooperx@gmail.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2017-12-29phy: phy-brcm-usb-init: Power down USB 3.0 PHY when XHCI disabledAl Cooper
Set PHY3_IDDQ_OVERRIDE in the xhci uninit routine. This will save additional power when the XHCI driver is not enabled. Fixes: 49859e55e364 ("phy: usb: phy-brcm-usb: Add Broadcom STB USB phy driver") Signed-off-by: Al Cooper <alcooperx@gmail.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2017-12-29phy: phy-brcm-usb-init: Some Low Speed keyboards fail on 7271Al Cooper
Enable the the Low Speed Keep Alive signal on the 7271b0 by setting the LS_KEEP_ALIVE bit in the USB CTRL OBRIDGE register otherwise some Dell Low Speed keyboards fail. Also do a little cleanup of the EBRIDGE ESTOP_SCB_REQ bit. Since this is only used on one platform, remove it from the platform tables and just use "if (family == "). Fixes: 49859e55e364 ("phy: usb: phy-brcm-usb: Add Broadcom STB USB phy driver") Signed-off-by: Al Cooper <alcooperx@gmail.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2017-12-29phy: phy-brcm-usb: Fix two DT properties to match bindings docAl Cooper
Change "brcm,has_xhci" and "brcm,has_eohci" device tree properties to the preferred "brcm,has-xhci" and "brcm,has-eohci". This also matches the existing device tree bindings document. Fixes: 49859e55e364 ("phy: usb: phy-brcm-usb: Add Broadcom STB USB phy driver") Signed-off-by: Al Cooper <alcooperx@gmail.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2017-11-13Merge tag 'usb-4.15-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB/PHY updates from Greg KH: "Here is the big set of USB and PHY driver updates for 4.15-rc1. There is the usual amount of gadget and xhci driver updates, along with phy and chipidea enhancements. There's also a lot of SPDX tags and license boilerplate cleanups as well, which provide some churn in the diffstat. Other major thing is the typec code that moved out of staging and into the "real" part of the drivers/usb/ tree, which was nice to see happen. All of these have been in linux-next with no reported issues for a while" * tag 'usb-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (263 commits) usb: gadget: f_fs: Fix use-after-free in ffs_free_inst USB: usbfs: compute urb->actual_length for isochronous usb: core: message: remember to reset 'ret' to 0 when necessary USB: typec: Remove remaining redundant license text USB: typec: add SPDX identifiers to some files USB: renesas_usbhs: rcar?.h: add SPDX tags USB: chipidea: ci_hdrc_tegra.c: add SPDX line USB: host: xhci-debugfs: add SPDX lines USB: add SPDX identifiers to all remaining Makefiles usb: host: isp1362-hcd: remove a couple of redundant assignments USB: adutux: remove redundant variable minor usb: core: add a new usb_get_ptm_status() helper usb: core: add a 'type' parameter to usb_get_status() usb: core: introduce a new usb_get_std_status() helper usb: core: rename usb_get_status() 'type' argument to 'recip' usb: core: add Status Type definitions USB: gadget: Remove redundant license text USB: gadget: function: Remove redundant license text USB: gadget: udc: Remove redundant license text USB: gadget: legacy: Remove redundant license text ...
2017-11-02License cleanup: add SPDX GPL-2.0 license identifier to files with no licenseGreg Kroah-Hartman
Many source files in the tree are missing licensing information, which makes it harder for compliance tools to determine the correct license. By default all files without license information are under the default license of the kernel, which is GPL version 2. Update the files which contain no license information with the 'GPL-2.0' SPDX license identifier. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This patch is based on work done by Thomas Gleixner and Kate Stewart and Philippe Ombredanne. How this work was done: Patches were generated and checked against linux-4.14-rc6 for a subset of the use cases: - file had no licensing information it it. - file was a */uapi/* one with no licensing information in it, - file was a */uapi/* one with existing licensing information, Further patches will be generated in subsequent months to fix up cases where non-standard license headers were used, and references to license had to be inferred by heuristics based on keywords. The analysis to determine which SPDX License Identifier to be applied to a file was done in a spreadsheet of side by side results from of the output of two independent scanners (ScanCode & Windriver) producing SPDX tag:value files created by Philippe Ombredanne. Philippe prepared the base worksheet, and did an initial spot review of a few 1000 files. The 4.13 kernel was the starting point of the analysis with 60,537 files assessed. Kate Stewart did a file by file comparison of the scanner results in the spreadsheet to determine which SPDX license identifier(s) to be applied to the file. She confirmed any determination that was not immediately clear with lawyers working with the Linux Foundation. Criteria used to select files for SPDX license identifier tagging was: - Files considered eligible had to be source code files. - Make and config files were included as candidates if they contained >5 lines of source - File already had some variant of a license header in it (even if <5 lines). All documentation files were explicitly excluded. The following heuristics were used to determine which SPDX license identifiers to apply. - when both scanners couldn't find any license traces, file was considered to have no license information in it, and the top level COPYING file license applied. For non */uapi/* files that summary was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 11139 and resulted in the first patch in this series. If that file was a */uapi/* path one, it was "GPL-2.0 WITH Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 WITH Linux-syscall-note 930 and resulted in the second patch in this series. - if a file had some form of licensing information in it, and was one of the */uapi/* ones, it was denoted with the Linux-syscall-note if any GPL family license was found in the file or had no licensing in it (per prior point). Results summary: SPDX license identifier # files ---------------------------------------------------|------ GPL-2.0 WITH Linux-syscall-note 270 GPL-2.0+ WITH Linux-syscall-note 169 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17 LGPL-2.1+ WITH Linux-syscall-note 15 GPL-1.0+ WITH Linux-syscall-note 14 ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5 LGPL-2.0+ WITH Linux-syscall-note 4 LGPL-2.1 WITH Linux-syscall-note 3 ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3 ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1 and that resulted in the third patch in this series. - when the two scanners agreed on the detected license(s), that became the concluded license(s). - when there was disagreement between the two scanners (one detected a license but the other didn't, or they both detected different licenses) a manual inspection of the file occurred. - In most cases a manual inspection of the information in the file resulted in a clear resolution of the license that should apply (and which scanner probably needed to revisit its heuristics). - When it was not immediately clear, the license identifier was confirmed with lawyers working with the Linux Foundation. - If there was any question as to the appropriate license identifier, the file was flagged for further research and to be revisited later in time. In total, over 70 hours of logged manual review was done on the spreadsheet to determine the SPDX license identifiers to apply to the source files by Kate, Philippe, Thomas and, in some cases, confirmation by lawyers working with the Linux Foundation. Kate also obtained a third independent scan of the 4.13 code base from FOSSology, and compared selected files where the other two scanners disagreed against that SPDX file, to see if there was new insights. The Windriver scanner is based on an older version of FOSSology in part, so they are related. Thomas did random spot checks in about 500 files from the spreadsheets for the uapi headers and agreed with SPDX license identifier in the files he inspected. For the non-uapi files Thomas did random spot checks in about 15000 files. In initial set of patches against 4.14-rc6, 3 files were found to have copy/paste license identifier errors, and have been fixed to reflect the correct identifier. Additionally Philippe spent 10 hours this week doing a detailed manual inspection and review of the 12,461 patched files from the initial patch version early this week with: - a full scancode scan run, collecting the matched texts, detected license ids and scores - reviewing anything where there was a license detected (about 500+ files) to ensure that the applied SPDX license was correct - reviewing anything where there was no detection but the patch license was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied SPDX license was correct This produced a worksheet with 20 files needing minor correction. This worksheet was then exported into 3 different .csv files for the different types of files to be modified. These .csv files were then reviewed by Greg. Thomas wrote a script to parse the csv files and add the proper SPDX tag to the file, in the format that the file expected. This script was further refined by Greg based on the output to detect more types of files automatically and to distinguish between header and source .c files (which need different comment types.) Finally Greg ran the script using the .csv files to generate the patches. Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-27Merge tag 'extcon-next-for-4.15' of ↵Greg Kroah-Hartman
git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into usb-next Chanwoo writes: Update extcon for 4.15 Detailed description for this pull request: 1. Split out extcon header file for consumer and provider device : The extcon has two type of extcon devices as following. - 'extcon provider deivce' adds new extcon device and detect the state/properties of external connector. Also, it notifies the state/properties to the extcon consumer device. - 'extcon consumer device' gets the change state/properties from extcon provider device. Prior to that, include/linux/extcon.h contains all exported API for both provider and consumer device driver. To clarify the meaning of header file and to remove the wrong use-case on consumer device. - include/linux/extcon-provider.h includes API for the provider device driver. - include/linux/extcon.h includes the API for the consumer device driver. 2. Support the SmartDock accessory on extcon-max77843.c device driver - Support the SmartDock accessory which detects following connectors at the same time. : USB host throught USB hub for mouse, keyboard and so on. : MHL connector for video output. : Charger connector for battery charging. - It tested with Unitek Y-2165 MHL+OTG Hub Smart Phone Dock. 3. Fix the minor issue of extcon driver - Delete the unneeded initialization in extcon-max14577. - Make extcon_info static const in order to fix the warning.
2017-10-23phy: brcm-sata: Allow RX equalizer tuningFlorian Fainelli
Parse the DT properties brcm,rxaeq-mode and brcm,rxaeq-value to correctly configure the RX equalizer of the PHY. This may be required to resolve specific signal integrity issues. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>