Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3339152pxv; Sun, 4 Jul 2021 15:56:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyk6m7oWGMCyiScSJGcHUkYDFJRjL3gaDA5AJP/qaDneIYBKs1V3rHsuxPIIWxAAY5DYm3Q X-Received: by 2002:a6b:c40d:: with SMTP id y13mr9494200ioa.78.1625439407183; Sun, 04 Jul 2021 15:56:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625439407; cv=none; d=google.com; s=arc-20160816; b=TvoWeXWk5hYHyboeUb8OeCFTtpVnk7Bpuk6R66mQumrbjprBM/3f5QcA2TQEuUGhbA lRm8bDQS1MRnu4of86N+d1DumQ4Aq5Gf8CSWA/s7JvbbLWb8i/qwyloIOg8pe40PhT4t +SsTYmoVI8AybtkmudfSR83h8e16hyur2hX9Fx57d+lljj0R64S93v9LSmex2mvzXQ3M 1/8RnXnQHEvTlyk7rJvTbyT5jzqPLeLvKtV7K6Y4ITNCO4SBiBoqX+AkjUdBvJ/63cgJ DRSSmc2F6viXMemTgCKH+VrFbZdeqZ+2INbiLYYrthtCCRpecvuV9jlB2Tf2C5d2cF+0 M+wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=fwDoLURDHKozXTahEpur8mu1fJsMk0Ebl7SqcPMfBPw=; b=SY8LoO05YSREFNfoXOISxWGfE2Lbz+PwXrgwMSQqJx+oaIhco7DLACl5I6T6hsXeso 8Koud6+bShyjmmIFll9a+EawNeK54eQEPcf3GNdumoAMbrBYnB1VPRjjUa5OpWELqx6O rddDWmyaAylTEwzVmKvw0XtIoEstkBwNvpya2QtJnupP/wfE2WYc8dZuge5Lj2sZMPe5 iFYvjhbwgwah1Nioh7pn3K+XSkB8ibEm2bV0Ex9jM1oggg17oeW/rKazcI/iuRxt6pQV Mh04KU4qbnx9/cBK9twdI71EO9rMszvz48UztzgXGWPTaaoxH7rFU1VK1YH9Ue4BJ0MO zhKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="C/hYSUpF"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w132si10893501jab.61.2021.07.04.15.56.35; Sun, 04 Jul 2021 15:56:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="C/hYSUpF"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229895AbhGDW6l (ORCPT + 99 others); Sun, 4 Jul 2021 18:58:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229642AbhGDW6i (ORCPT ); Sun, 4 Jul 2021 18:58:38 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BBCDC061574; Sun, 4 Jul 2021 15:56:01 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id bu19so29035948lfb.9; Sun, 04 Jul 2021 15:56:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=fwDoLURDHKozXTahEpur8mu1fJsMk0Ebl7SqcPMfBPw=; b=C/hYSUpFQgC9QKbD1nlcmsQpG1PDQOsT45ZLXQKcIMh7y0iGOolSnubsJ97nuZ/o6f 8k2j6+wQ1Ao2OpA59+C6ASr8CLUGDidpgj2eItjQPhaOG+7EKVx1cWI/0CTFKr5BfNCP Yge5Cq1uzvA81CMTC4Syz5ZzcCy6CSU74fpvjCo700+KBAHNMYBkzD9lKwVB9GwVvUn7 61eKVv3sWwTE63E7qPMGhHl3ROGv3W/T8FC1NYqMpflZOqvRgoLgLwfrsmahuLegLU8K yWkOnfOk2OYQomfyNXcVKhtY/9FerWa4b4qLW5VoFQv4ONx3ww+YwDL8UodI4YOcslNT Pwjg== 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=fwDoLURDHKozXTahEpur8mu1fJsMk0Ebl7SqcPMfBPw=; b=OHizu0G0V2swkoevRUwHU8bn3/70PpZQbf/J2ux2LWcwUrD0pBgeE4BrQn7lfPn29c nVW22HC9HiD7t8lXiiIfOHSmHAQ5dE71h6C6bpP/Dp1depjb6KRwOexmpLcR5UGUCgWa AZ8ArZkH+LSha8pGriRtzijqZihLlLVM9IFukaVXVBR03ftSufbpTVzMQhBwjYUGhkmW jrjNGARGhxyUINZnGsJ3FW3lxfB1n9L3sM5JHHHsBQO8T4sYyJGsyNb7otRq/91ySFCb HtIwRXFdZVg+lxryFnE9ihpUkZ0dpBotpDlTk4jghurI4MiZ4wAvdJbirun1+9JSXH94 hWtQ== X-Gm-Message-State: AOAM532dLo4aEWsLuUB/RSLFbbRhJuLtxiG3XfoNEcE+1+FtC75YW3gQ Cb9NWNX+BIA1MMPtKGc/8Fc= X-Received: by 2002:a05:6512:3618:: with SMTP id f24mr1084494lfs.517.1625439359975; Sun, 04 Jul 2021 15:55:59 -0700 (PDT) Received: from localhost.localdomain (94-29-37-113.dynamic.spd-mgts.ru. [94.29.37.113]) by smtp.gmail.com with ESMTPSA id i13sm497921lfc.111.2021.07.04.15.55.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Jul 2021 15:55:59 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Mark Brown , Rob Herring , Sebastian Reichel , Peter Chen , Greg Kroah-Hartman , Felipe Balbi , David Heidelberg Cc: devicetree@vger.kernel.org, linux-pm@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org Subject: [PATCH v3 00/12] Add OTG mode support to Tegra USB PHY, SMB347 and Nexus 7 Date: Mon, 5 Jul 2021 01:54:21 +0300 Message-Id: <20210704225433.32029-1-digetx@gmail.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This series adds USB OTG mode support to the NVIDIA Tegra USB PHY driver, SMB347 charger driver and Nexus 7 tablet. Changelog: v3: - Further improved interrupt handling in the PHY driver by removing assumption that interrupt is enabled by the CI driver at the time of set_wakeup() invocation, which makes this function a bit more universal. v2: - The PHY's interrupt is now enabled from PHY's set_wakeup() callback. It prevents getting a spurious interrupt during the CI driver probe time. Dmitry Osipenko (12): dt-bindings: phy: tegra20-usb-phy: Convert to schema dt-bindings: phy: tegra20-usb-phy: Document properties needed for OTG mode soc/tegra: pmc: Expose USB regmap to all SoCs usb: phy: tegra: Support OTG mode programming usb: otg-fsm: Fix hrtimer list corruption dt-bindings: power: supply: smb347-charger: Document USB VBUS regulator power: supply: smb347-charger: Make smb347_set_writable() IRQ-safe power: supply: smb347-charger: Remove caching of charger state power: supply: smb347-charger: Implement USB VBUS regulator arm64: tegra132: Add new properties to USB PHY device-tree node ARM: tegra: Add new properties to USB PHY device-tree nodes ARM: tegra: nexus7: Enable USB OTG mode .../bindings/phy/nvidia,tegra20-usb-phy.txt | 74 ---- .../bindings/phy/nvidia,tegra20-usb-phy.yaml | 377 ++++++++++++++++++ .../power/supply/summit,smb347-charger.yaml | 28 ++ arch/arm/boot/dts/tegra114.dtsi | 6 + arch/arm/boot/dts/tegra124.dtsi | 9 + arch/arm/boot/dts/tegra20.dtsi | 9 + .../tegra30-asus-nexus7-grouper-common.dtsi | 25 +- arch/arm/boot/dts/tegra30.dtsi | 9 + arch/arm64/boot/dts/nvidia/tegra132.dtsi | 9 + drivers/power/supply/Kconfig | 1 + drivers/power/supply/smb347-charger.c | 259 +++++++++++- drivers/soc/tegra/pmc.c | 6 +- drivers/usb/common/usb-otg-fsm.c | 6 +- drivers/usb/phy/phy-tegra-usb.c | 202 +++++++++- .../dt-bindings/power/summit,smb347-charger.h | 4 + include/linux/usb/otg-fsm.h | 1 + include/linux/usb/tegra_usb_phy.h | 5 + 17 files changed, 926 insertions(+), 104 deletions(-) delete mode 100644 Documentation/devicetree/bindings/phy/nvidia,tegra20-usb-phy.txt create mode 100644 Documentation/devicetree/bindings/phy/nvidia,tegra20-usb-phy.yaml -- 2.32.0