From patchwork Sat Mar 9 01:56:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 10845693 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 9FA8B1390 for ; Sat, 9 Mar 2019 01:59:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7D12E2B8D2 for ; Sat, 9 Mar 2019 01:59:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 64AF32A749; Sat, 9 Mar 2019 01:59:03 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CCA4C2B1AB for ; Sat, 9 Mar 2019 01:59:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=dLDMp8OgCbmN9Q0G2LlI62hWQjz2jVt7+uqFJtQntLc=; b=U0L umiUdealBLC4beJE32+d/eIV/tbyKbZgUa82+ozx4hsXoBNr+rV2DNw7KsvGMGYXgmUgv4MtFNLGt rPRU4Ew7coWoh7yNl9g5kRCA3PjuEQN5lHaRiePS8ZpgY3U80srXL+htgQIvpcDne31tqj3WqZ/Gs JsF8CQlTA4emvbSpTU9XIu+hkoF0Zjrc6u3ht7izMFsnTMql46ed/ewqcGpZ5Fn/zhExgLZhWp3x4 MXMqAIsOBkUHuKLZy/pwHfOajbEAeyr3AzLPimPZqjir7XbDtxvOE/KKoZlR9rIZEuy3Wb3LoGlCr UW75sy1FiMQSCPwLN3Dq9ARkX1sju4A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h2RGO-0001kn-1J; Sat, 09 Mar 2019 01:59:00 +0000 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h2RGK-0001kR-Py for linux-arm-kernel@lists.infradead.org; Sat, 09 Mar 2019 01:58:58 +0000 Received: by mail-pg1-x544.google.com with SMTP id m2so15511768pgl.5 for ; Fri, 08 Mar 2019 17:58:55 -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; bh=G7FkEcnypMBPvT4q2ATZFH8XeVcIvhyGQ8lI3Q4OJWU=; b=BfL8kHY/V+PnvPoN6GIOnQB4nkXmUoZp2j9+3Ko5gSsAQP5Iw4COXiaaYR1WYcfFcb 2MdDV++sxfrJ7pjqo68xYPY+e7w07dEML6xzoOZmFdRK5c24yft7wi3Kf3QYseNcuxCg uoFLcWV9MV6pbXEi3SgS2sPuEnne51eOlgdZKrG+HegHiTqQrT/XczwA89SSUKcUmUaj nfNGEc4dq2rsP/LebHWYvyPUWwJPLiaLpYXtJaP9E2roFPFlp+vudLr8hi2yWeeh+cgA u9R8TZQfUpdkZxj4uwRcb8gWKuxlNN4cL18j8yY/XdzwwYZd3oA/SJ0wK7N6rR7ue+4I Js2A== 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; bh=G7FkEcnypMBPvT4q2ATZFH8XeVcIvhyGQ8lI3Q4OJWU=; b=esgvxtqRW3k38PFRiPEtiwMPA2fXJt9Hk3HT3Im9eIPciUan0gIWgjTPcXm19GEWlc h3MEnRI85UKzoJ8rXB0WP9qaysMj7mL3ZdD8f3s2KhpBE5XqCrmv67EgobdAk8+Wy8C4 jiLk4tfLPB8+UsQl1V5PAkm94DwJkCLpJV5eeIt3u0/9RI5gEuYXOT3dkXzT5oN52NlV VS+Yl9nSZAgW9xTuLZeEo0WbuIjlmKNu1A7fea2pu1LdPEhuznesSH7zT/WwITfCf8g6 PWdl8TAmTz7eYMs/mR7m4zrzwzLfgW5ujsTs+HVCyGP6VRzBeP8Q0AI3RnxsbEbspelt cK9A== X-Gm-Message-State: APjAAAWo2ZgMkWKlbsJf4W1bdeqcRGbEdtStld0Icjs6stob5hPOKbWe ZJe0imaHohgN8WalMyOyC3te X-Google-Smtp-Source: APXvYqyfAWOX9HKl5uweYLtR7YUk/MQlqUiadwQsGb3GaeMY03nuKRDBNxE5nzDSDAZ3KXK5L8jVWA== X-Received: by 2002:a63:2004:: with SMTP id g4mr19684261pgg.337.1552096735282; Fri, 08 Mar 2019 17:58:55 -0800 (PST) Received: from localhost.localdomain ([157.51.75.198]) by smtp.gmail.com with ESMTPSA id b65sm16040201pfm.127.2019.03.08.17.58.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Mar 2019 17:58:54 -0800 (PST) From: Manivannan Sadhasivam To: linux@armlinux.org.uk, xuwei5@hisilicon.com Subject: [PATCH 0/2] Handle I2C and SPI reset on HI6220 SoC Date: Sat, 9 Mar 2019 07:26:33 +0530 Message-Id: <20190309015635.5401-1-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190308_175856_853963_0463D638 X-CRM114-Status: UNSURE ( 9.73 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: daniel.thompson@linaro.org, guodong.xu@linaro.org, linus.walleij@linaro.org, linux-kernel@vger.kernel.org, peter.griffin@linaro.org, haojian.zhuang@linaro.org, Manivannan Sadhasivam , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hello, This small patchset adds the reset functionality to the I2C and SPI peripherals on HI6220 SoC from HiSilicon. Those peripherals needs to be taken out of reset before being used. But earlier we were depending on the bootloader to do the job but as suggested by Daniel Thompson, a more cleaner approach would be to handle the reset in corresponding drivers. Hence, one of the patch adds reset properties to the I2C and SPI nodes and the other one adds missing reset functionality to the AMBA Primecell bus driver. Because the AMBA devices are being accessed before the driver probe (reading pid and cid values), we need to deassert the reset line in the bus driver itself just before the read. I'd expect the patch 1 to go via arm tree and patch 2 via hisi tree. Thanks, Mani Manivannan Sadhasivam (2): amba: Take device out of reset before reading pid and cid values arm64: dts: hisilicon: Add reset properties for HI6220 I2C and SPI arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 8 ++++++++ drivers/amba/bus.c | 9 +++++++++ 2 files changed, 17 insertions(+)