From patchwork Sat Feb 2 23:59:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 10794523 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E0234746 for ; Sat, 2 Feb 2019 23:59:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C30E12D690 for ; Sat, 2 Feb 2019 23:59:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B20AF2D689; Sat, 2 Feb 2019 23:59:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 57F272D689 for ; Sat, 2 Feb 2019 23:59:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726945AbfBBX7R (ORCPT ); Sat, 2 Feb 2019 18:59:17 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:33050 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726825AbfBBX7R (ORCPT ); Sat, 2 Feb 2019 18:59:17 -0500 Received: by mail-lj1-f193.google.com with SMTP id v1-v6so8856182ljd.0 for ; Sat, 02 Feb 2019 15:59:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jqG8bbOK8eH3rFqme09nv/zpTnlZAZt6xfY8EHM8lJE=; b=Koj8zuYAsk3xc9bnfUtXTETgb81E92Jlk0+OGeIyXsNpuOp5hBNuuxPFlmqOCxvpJF T/zYOLCIC7AsI7cPbbFIrM/5Atzvy1n39mjPdsJs0uY9VAcK1XdH6twCYh3IPfZ3Wmdh fNDIKUke6V2NWAXlB/wsMpiOpLuUVcM1avETI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jqG8bbOK8eH3rFqme09nv/zpTnlZAZt6xfY8EHM8lJE=; b=YmfCLBt2+VRbkKzq/O5Lpp8Q6FcM/1pvKK/2TlMmHD8ETz1QbKFqFwNy9zPnonFBjG kkyrFBhMTAa+xr1oHX+2V+GXvok9vWsA0zA+aV8VOj6SyF5Ttg051QfV4IfFDAylXyKc RJ9aLIBUbc2keKbEvAw4B+tUJhKdqCKJRD5y8olCsP/pD/KdzatkjC7HPdn7kmlYmySQ RqhKMdPvjTVDBhqEi9d/cEiyX0B+xUSCA1GYBSh7vKbs7AxovwjfkB3EbBY8TyMb97mh qGVYTrkv/emmUS3IffzbLot75+zZbvrdyhjKNflWNBld8FxWedpB6yNMvu/R9nNRvSqK iyFw== X-Gm-Message-State: AJcUukfhCm/KzZHxylxRj6IbHpFxbxDrXu1rY0ANKORLHJc9/08po0x9 ApPAKUe2yKTEOhlvlelECIb83F6oCvU= X-Google-Smtp-Source: ALg8bN7oagvRB97RIxQilzxfbAfMvQn5TsttSyqXJs5UbmehvPBgsA5wqnKgA66O+SZpA5ZckRg6RQ== X-Received: by 2002:a2e:1bc5:: with SMTP id c66-v6mr37295394ljf.96.1549151954924; Sat, 02 Feb 2019 15:59:14 -0800 (PST) Received: from linux.local (c-ae7b71d5.014-348-6c756e10.bbcust.telenor.se. [213.113.123.174]) by smtp.gmail.com with ESMTPSA id o25sm2195724lfd.29.2019.02.02.15.59.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 02 Feb 2019 15:59:13 -0800 (PST) From: Linus Walleij To: Greg Kroah-Hartman , Felipe Balbi Cc: linux-usb@vger.kernel.org, Linus Walleij , Robert Jarzmik , devicetree@vger.kernel.org Subject: [PATCH 1/2] USB: gadget: pxa25x: Add DT bindings Date: Sun, 3 Feb 2019 00:59:07 +0100 Message-Id: <20190202235908.30751-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This adds device tree bindings for the PXA25x USB Device Controller as found in the PXA25x and the IXP4xx. Cc: Robert Jarzmik Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij --- .../devicetree/bindings/usb/pxa25x-udc.txt | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/pxa25x-udc.txt diff --git a/Documentation/devicetree/bindings/usb/pxa25x-udc.txt b/Documentation/devicetree/bindings/usb/pxa25x-udc.txt new file mode 100644 index 000000000000..bbdbe0df3565 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/pxa25x-udc.txt @@ -0,0 +1,27 @@ +PXA25x UDC (USB Device Controller) + +The PXA25x and IXP4xx USB Device Controller is different from the +PXA27x UDC described in pxa-usb.txt and is compatible between the +Marvell PXA25x and the Intel IXP4xx devices. + +Required properties: + - compatible: Should be one of + "marvell,pxa25x-udc" + "intel,ixp4xx-udc" + for USB controllers used in device mode. + - reg: usb device MMIO address space + - interrupts: single interrupt generated by the UDC IP + - clocks: input clock of the UDC IP (see clock-bindings.txt) + +Optional properties: + - gpios: + - gpio activated to control the USB D+ pullup (see gpio.txt) + +Example: + +usb@c800b000 { + compatible = "intel,ixp4xx-udc"; + reg = <0xc800b000 0x1000>; + interrupts = <12 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&pclk 0>; +}; From patchwork Sat Feb 2 23:59:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 10794525 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E6138746 for ; Sat, 2 Feb 2019 23:59:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D6D8B2D689 for ; Sat, 2 Feb 2019 23:59:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CADA92D698; Sat, 2 Feb 2019 23:59:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 75DAF2D689 for ; Sat, 2 Feb 2019 23:59:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726975AbfBBX7T (ORCPT ); Sat, 2 Feb 2019 18:59:19 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:35889 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726710AbfBBX7T (ORCPT ); Sat, 2 Feb 2019 18:59:19 -0500 Received: by mail-lj1-f195.google.com with SMTP id g11-v6so8855323ljk.3 for ; Sat, 02 Feb 2019 15:59:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zfjPCn0ENRw4L2SfyojKs80PT5r00usqAqi61XRIz/0=; b=dt2WTdrpkSnMhsqaacx4rVHnFPSxR7xVviYfQF6oHnNN+21EyuLrhfUtW8CO7aWcrx RTG+bw0B6NkKAgO9bH6QBrCyRrbFSemV2bE/2aJGWGn6I6Ja8lY/M3xKehkRKtJBEu67 jO5TLZ9q0gJs46xnQhvAO8QPV9c+i0ZR+EJA4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zfjPCn0ENRw4L2SfyojKs80PT5r00usqAqi61XRIz/0=; b=OOPNDwnGKeWkpgiDBuYSCQ5Tm2xB3t3WLn1hMbmxAWFequG2qsY1GDTmxY7gmqbPbq XFnIBf1YygrZP1im/eRgPWwsIiamwyI5gGm0yxFiUplZYvp1ZNJSzPBYKXT1IjeUtMJw C5jrc+o/8h8u+zN9Eapddefb/+5uqQTJoS5iANCRIU06aCzWOs6KmMtkRAznu9naP9zG vRvGtQNMH/nGr/eWrXSY92ANIXvM5eNjDGVhbz07lVxjHksmxPIhXTfTvQpcEH2ZuM6m HEhcqpZMheORPERWLHvbqGnhQpKQUo96uHEupiG9S7VcDfv1sX1emgF+Aifpwf29ebM2 ztoA== X-Gm-Message-State: AJcUukfM9EVqbVAQfXBNzIvWmnz8W26A/FMNN0WWK+Y8igSok45MhWlm 4m46pX/z/l6W1VXrp+rQDyjN0g== X-Google-Smtp-Source: ALg8bN595esxx30np6q9I6GMC1bVidS5k3+bcpwDPj/v7HYxQ9TBrQtHSuQgc8SC+HeaXebH8/vLgA== X-Received: by 2002:a2e:7011:: with SMTP id l17-v6mr35004785ljc.147.1549151957446; Sat, 02 Feb 2019 15:59:17 -0800 (PST) Received: from linux.local (c-ae7b71d5.014-348-6c756e10.bbcust.telenor.se. [213.113.123.174]) by smtp.gmail.com with ESMTPSA id o25sm2195724lfd.29.2019.02.02.15.59.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 02 Feb 2019 15:59:16 -0800 (PST) From: Linus Walleij To: Greg Kroah-Hartman , Felipe Balbi Cc: linux-usb@vger.kernel.org, Linus Walleij , Robert Jarzmik Subject: [PATCH 2/2] USB: gadget: pxa25x: Add DT probing Date: Sun, 3 Feb 2019 00:59:08 +0100 Message-Id: <20190202235908.30751-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190202235908.30751-1-linus.walleij@linaro.org> References: <20190202235908.30751-1-linus.walleij@linaro.org> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This makes it possible to instantiate the PXA25x UDC driver from the device tree. Cc: Robert Jarzmik Signed-off-by: Linus Walleij --- drivers/usb/gadget/udc/pxa25x_udc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/usb/gadget/udc/pxa25x_udc.c b/drivers/usb/gadget/udc/pxa25x_udc.c index d4be53559f2e..480828b76059 100644 --- a/drivers/usb/gadget/udc/pxa25x_udc.c +++ b/drivers/usb/gadget/udc/pxa25x_udc.c @@ -2529,6 +2529,16 @@ static int pxa25x_udc_resume(struct platform_device *dev) /*-------------------------------------------------------------------------*/ +static const struct of_device_id udc_of_match[] = { + { + .compatible = "intel,ixp4xx-udc", + }, + { + .compatible = "marvell,pxa25x-udc", + }, + {}, +}; + static struct platform_driver udc_driver = { .shutdown = pxa25x_udc_shutdown, .probe = pxa25x_udc_probe, @@ -2537,6 +2547,7 @@ static struct platform_driver udc_driver = { .resume = pxa25x_udc_resume, .driver = { .name = "pxa25x-udc", + .of_match_table = of_match_ptr(udc_of_match), }, };