Received: by 2002:a05:6500:1b41:b0:1fb:d597:ff75 with SMTP id cz1csp133313lqb; Tue, 4 Jun 2024 07:12:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVSWUONVWLfnYmiy/oIAl8naexMfcefOVZ2+UwmPcmOpS3HHJZNBvyJXqz8LxvvKXkVqIG4c6wKI8vhePqv1P305Q+i+zuG05Y1vE5F4Q== X-Google-Smtp-Source: AGHT+IEaRWBKYMaFpklE1cr8tZ2tLg5wWYhF1NdzqvnV1ss7xFoTGBgbrqaxRy3hW+b4sgVx+Ato X-Received: by 2002:a9d:7312:0:b0:6f9:3197:4631 with SMTP id 46e09a7af769-6f93197477fmr4403463a34.19.1717510343520; Tue, 04 Jun 2024 07:12:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717510343; cv=pass; d=google.com; s=arc-20160816; b=c+gqJfPK42CesZEUJ6Z7Z925RAmFJ0A7rZ3sqfzFlSszLAA00pS+iFJWVlWiNhB0/y QhbvT+4w/xXAjKvl4k8Jz09ufobLj/F/Wojn2XYOcxQ8nGepg5MCAgBHd5t6h/VYjnsv 0F82UiPvGiM/z/QGwKaQ5z8ZidjKqVlXUsPh8BS+hCc/gDp+mF0fGczdtgITECDL0nBJ jVuxXsXReW9dXUD6Pou6OyPXqwzOxfUgvP60DhtH2UZLIftWk7aFn2WQFTHBtjCRyWd8 LJShJUW2uT7wqPg2piFZzf8zjzl3ukjGyhxotOSyEGXsSsFWwIe2cV0zvCk8kzizj7rY sCCg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=sTI0bo9QlSR3jF5fzKL/lNTXRRTehVU4sAkZtkhRBzM=; fh=e/jL5WfYZGPs6oV7oNm2EUYpwHrdIBbFGLDWM4TdkkM=; b=rwE528GRpA0KK4nIFcdekm2RaafxREmENHGIuOyesB3gNwZIA25FwxYcJJCMc+BUVg +dUzbbeFSLB4nVT8GDZRXLftJvjDzIev8xF2AOuTKtCYC3Fnq0zSyhLkmsCAB3uMYMMx sjZXCVh3trtPXtDx7dh2tCJu6wClGo6nyrdZPzhQcwdkuo56oF8o05Ad/jCfA7LkZOjC ggrw73LPCpvnbwBXodYHqAay+51mYaX/1yTI00/ILFlZ9PIjZO6gF3d797zmvDBUh85Z UETZdAvr/NMiIz8YxUozTgnHj2rSAmaVcrN3RLHyd/uA53pYoYhiWUT0ruY9aXMUbMSa rSkw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="K/Qea5iD"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-200782-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200782-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id ada2fe7eead31-48beead1fcfsi559284137.260.2024.06.04.07.12.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 07:12:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-200782-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="K/Qea5iD"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-200782-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200782-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3B8E31C22111 for ; Tue, 4 Jun 2024 14:12:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C08DE4BAA6; Tue, 4 Jun 2024 14:12:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="K/Qea5iD" Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 556CDD535; Tue, 4 Jun 2024 14:12:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717510334; cv=none; b=hnW0TMEWzUXB151Wy8c2iQqqjE8MU+J3VuxHRiD4/4PtI8JKD6mU3gwAzcIVJQIJDUd/wj1PZU89ahRdp8fc8gFynLXKUpDei/uI8A8VbmV4PaOJO/0TsihC/S+cnZrBiKivcH+PoeSN6DhS8wl8StiEKMBIAgPCAFgMKCDPQAQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717510334; c=relaxed/simple; bh=C7M3Ung7NZyyQ/5AeZaQ98hsGFGD8qp5A9MnbnjMmQI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=j8Vs9rtyxKhLRV3QjDDHmyCEpT5tDfrpQJUrG8pBy6FlYQdg3qPiGswMCSLKsF96o/PMMxXopABgUDofULtjjisioGtZMrmleEHhrbMEFsi4/9ZWXyivKvdled6b/0/J6fGCPpilCT2bSe+CzIALqRh+Y5UrSwvJ30+Xnxm5FqI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=K/Qea5iD; arc=none smtp.client-ip=209.85.167.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-52b936c958dso3695794e87.0; Tue, 04 Jun 2024 07:12:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717510331; x=1718115131; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=sTI0bo9QlSR3jF5fzKL/lNTXRRTehVU4sAkZtkhRBzM=; b=K/Qea5iDsFDuq07bS2wNusd6BIT6RB+yUrWJVZXlhc3/i88WjGGvKxAj1U14xITIwK N/+MVJKFvH55Ky4ecpCX5t1fVZ8eaDPFh+q57ROkTWbDJnQqYpzAFrxyTmxahfSHItFr +T5jS6GYoEdh1yS4c/5gFLjvujKcy4CZ/ECXOVlvET63Or2z/e3Dum2jbYqOf4wCnOSk DiB2F0UfXh1tbID9EfLTORuJbitBIQ5nKWy4ITEIXaa/dax7buFns900sOVB47wpHqwH dluFnRVxAdbBfxtFQpByUaOjZXa3krBLlFOxJUVQlF7FwGHvEG37CZtcnanKuacAvbok FvIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717510331; x=1718115131; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=sTI0bo9QlSR3jF5fzKL/lNTXRRTehVU4sAkZtkhRBzM=; b=XDQfojY+lt8IMqYOoQWZ9bcl+fnixoueCVVgD7ar7BrXb01Ja4Wmxv/o1bb7riFTlA VLYh+D6nFnjkn0cIyVD3jxij3II548cdF2h4v1lBH98d2VeJ4yZU52rf3f8jdlJIiyIn d0z0zJGUmQf5PBnL+S8BH1uj/iATOFfPdvN6F8LOy1ScWiPWP830MwVTWtlVkO4sEDfn 72IM4HerBUayRXy1s8fK9CfheKzzT251V+o3YsTsAoE1H5ATYZQ/hE6yifYmkUkZ400O 7WeEIG0RXuY1OZ2aAoup8+6w2PD9fpxdKF3BzwX8UW97bD9S2PIw6aEI59fghnWJtbQz 7x4A== X-Forwarded-Encrypted: i=1; AJvYcCXbXfPDivas3KgzaIGQvgpD/pOX1oBo+GPx2mgD9F/4Pj3poef6bI0jhW9YW3peXqyrXR/cFqIgF9QDTgWGa1Cuq5zlDxQb9dne102ceYe5qnnnB3k/9S3kaytjLXqxcyk4yR3egGTVQfWLGQHKHb8TFETMtQlNxbG2CzsL8KRhC7OzdgI= X-Gm-Message-State: AOJu0YxCr1ztHgbsnlVuVnFU5HSYYn9XUK2t9drF8QorggS+qeUE+Zuh gJbl7xFrNy3KQ6AfVVOd/qVPdovmFnQM5RAva6iq+rR99oUkdHmA X-Received: by 2002:a05:6512:3e24:b0:52b:874a:7df with SMTP id 2adb3069b0e04-52b8955c5bfmr9728475e87.12.1717510331074; Tue, 04 Jun 2024 07:12:11 -0700 (PDT) Received: from yoga-710.tas.nnz-ipc.net ([178.218.200.115]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52b982d3de7sm742743e87.2.2024.06.04.07.12.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 07:12:10 -0700 (PDT) From: Dmitry Yashin To: Linus Walleij , Heiko Stuebner Cc: Luca Ceresoli , Jianqun Xu , Jonas Karlman , devicetree@vger.kernel.org, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Dmitry Yashin Subject: [PATCH v3 0/2] pinctrl: rockchip: add rk3308b SoC support Date: Tue, 4 Jun 2024 19:10:18 +0500 Message-ID: <20240604141020.21725-1-dmt.yashin@gmail.com> X-Mailer: git-send-email 2.45.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This patch series and adds support for pin controller found on rk3308b. According to rk3308b TRM, this pinctrl much the same as rk3308's, but with additional iomux routes and 3bit iomuxes selected via gpio##_sel_src_ctrl registers. Downstream kernel [1] managed this SoC's with rk3308b_soc_data_init, wich picked configuration based on cpuid. Upstream pinctrl patches droped soc init function. The function rk3308b_soc_sel_src_init sets up gpio##_sel_src_ctrl registers, making SoC to use 3bit iomuxes over some 2bit old ones. These patches have been tested on Radxa's ROCK Pi S, one based on rk3308 and the other on rk3308b (from the latest batches). For the new boards it fixes broken spi1 clk. Similar effort [2] was made several years ago, but without keeping base rk3308 SoC pinctrl support. Based on feedback from Luca, Heiko and Jonas, the v2 series droped dt binding in the favor of runtime SoC detection, so iomux_recalced and iomux_routes updated for the new SoC's and patch 1 delays recalced_mask and route_mask init. [1] https://github.com/radxa/kernel/blob/stable-4.4-rockpis/drivers/pinctrl/pinctrl-rockchip.c#L4388 [2] https://lore.kernel.org/linux-rockchip/20220930102620.1568864-1-jay.xu@rock-chips.com/ v1 Link: https://lore.kernel.org/all/20240515121634.23945-1-dmt.yashin@gmail.com/ v2 Link: https://lore.kernel.org/all/20240529143534.32402-1-dmt.yashin@gmail.com/ Changes in v3: - Witespace cleanup - Add Luca's r-b tag - Rebase onto linux-pinctrl for-next branch Changes in v2: - Drop routes fixup patch, already applied - Drop dt binding patch - Add new patch to delay recalced_mask and route_mask init - Rework last patch from dt to runtime setup with rk3308_soc_data_update Dmitry Yashin (2): pinctrl: rockchip: delay recalced_mask and route_mask init pinctrl: rockchip: add rk3308b SoC support drivers/pinctrl/pinctrl-rockchip.c | 286 +++++++++++++++++++++++++++-- drivers/pinctrl/pinctrl-rockchip.h | 1 + 2 files changed, 267 insertions(+), 20 deletions(-) base-commit: 32335efff386d04961b178d4c6b7d1ccbafb729f -- 2.39.2