From patchwork Fri Jul 21 20:37:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Duje_Mihanovi=C4=87?= X-Patchwork-Id: 124103 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp469785vqg; Fri, 21 Jul 2023 14:19:01 -0700 (PDT) X-Google-Smtp-Source: APBJJlEwTpjFI8J36LbjYoBB9ac+//LWGcBhUn1Rg5De8Fmd9s0CtXj45sg9nPZu4mNXSwNRuCGC X-Received: by 2002:a2e:8245:0:b0:2b9:36c1:cfa7 with SMTP id j5-20020a2e8245000000b002b936c1cfa7mr2185144ljh.38.1689974340965; Fri, 21 Jul 2023 14:19:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689974340; cv=none; d=google.com; s=arc-20160816; b=rO9mqeXYlFtxbrISUFP7uNNvTWyeH/hNaXfAq0s+qn6inEg8QDIITPgMcyVOmBHFUa kj4wKVaadcHfENyQ0d0Yze5DmcXFxMsp5RpPR+/UYRWqPlk0UflzdLtcp71/IHO+GFdO Hy5ug5AAlpiJXLrUagUodBw0LBul0IUDsW/oulF3CPQtCL7SPXUisbNhg8WO6hqz9NXG gUmwgOCMwVidBO9qrn2SLAbylTbmXfkBDpIBAOQKXvLv5BV/u8/Qaztf5DgpI48JehLs INoSa0XM+5e9cR8YzkThFKNLNliStCSHhUeKz/2o6dQ0pUcD/9WYTrnjg6/6zg9Z6+lJ d3OA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=4Xb24WjxKX1Ozqynt2UuER9M6qlxHUWuQqYJl6g7ERk=; fh=OzHIctYqDeRZupNbeZWnNf2hiiJ82jdaKAZ1rnMDFrc=; b=CVbLDPD9PvdzQltqJ99qzekcJ1XQIdUddtZ9lUa5mxZ7mdMTbfuhp0HIZZO8O8g26u sn3qMtjv5Hnid5aPdreRr2oIiATbnShXxbS9KO08rR3wTcyMvxhgii9U+apK6DzO3R9K DYPwES0RhR2F3ZWuK3xTqHGMPIWR7/vaFyFK9pFCBwVBjB8zrnuHOWeV7Mz/J4WfLz8U vojo0+ip/qfDX0tBRzr2FJsNNbqjLb6Z9LIFkfj2KjvRKdcfER6UPnpqx+oBqAfBGJn2 H4ndxW8SD9BXlF7PfJXzM54X34egbyIlvj0Lka3ry+J6e8WqkiaOtb0jBP+sEJsneLEa mOWw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sb27-20020a170906eddb00b0098eeb136963si2492464ejb.172.2023.07.21.14.18.34; Fri, 21 Jul 2023 14:19:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231149AbjGUVMG (ORCPT + 99 others); Fri, 21 Jul 2023 17:12:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229763AbjGUVMD (ORCPT ); Fri, 21 Jul 2023 17:12:03 -0400 X-Greylist: delayed 344 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 21 Jul 2023 14:11:57 PDT Received: from mx.skole.hr (mx1.hosting.skole.hr [161.53.165.185]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D39E359D; Fri, 21 Jul 2023 14:11:57 -0700 (PDT) Received: from mx1.hosting.skole.hr (localhost.localdomain [127.0.0.1]) by mx.skole.hr (mx.skole.hr) with ESMTP id 80C4986D18; Fri, 21 Jul 2023 23:06:10 +0200 (CEST) From: =?utf-8?q?Duje_Mihanovi=C4=87?= To: Greg Kroah-Hartman , Jiri Slaby , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, afaerber@suse.com, =?utf-8?q?Duje_Mihanovi=C4=87?= Subject: [PATCH 01/10] tty: serial: 8250: Define earlycon for mrvl,mmp-uart Date: Fri, 21 Jul 2023 22:37:43 +0200 Message-ID: <20230721210042.21535-2-duje.mihanovic@skole.hr> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230721210042.21535-1-duje.mihanovic@skole.hr> References: <20230721210042.21535-1-duje.mihanovic@skole.hr> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772066534679172761 X-GMAIL-MSGID: 1772066534679172761 mrvl,pxa-uart already supports earlycon and both compatible strings use the same driver, so there's no reason for mmp-uart to not have earlycon as well. Signed-off-by: Duje Mihanović --- drivers/tty/serial/8250/8250_pxa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/serial/8250/8250_pxa.c b/drivers/tty/serial/8250/8250_pxa.c index 28b341f602c6..a5b3ea27fc90 100644 --- a/drivers/tty/serial/8250/8250_pxa.c +++ b/drivers/tty/serial/8250/8250_pxa.c @@ -183,6 +183,7 @@ static int __init early_serial_pxa_setup(struct earlycon_device *device, return early_serial8250_setup(device, NULL); } OF_EARLYCON_DECLARE(early_pxa, "mrvl,pxa-uart", early_serial_pxa_setup); +OF_EARLYCON_DECLARE(mmp, "mrvl,mmp-uart", early_serial_pxa_setup); #endif MODULE_AUTHOR("Sergei Ianovich"); From patchwork Fri Jul 21 20:37:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Duje_Mihanovi=C4=87?= X-Patchwork-Id: 124106 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp473689vqg; Fri, 21 Jul 2023 14:26:13 -0700 (PDT) X-Google-Smtp-Source: APBJJlGR8+9yqYtQ/8PqLjTjJ9/o9jEFD32dX1NDDjB3FeIJ71Lb0gghDXzT6H6t3QUDciOR7D6L X-Received: by 2002:a17:906:538a:b0:988:9621:d85f with SMTP id g10-20020a170906538a00b009889621d85fmr2403850ejo.58.1689974773667; Fri, 21 Jul 2023 14:26:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689974773; cv=none; d=google.com; s=arc-20160816; b=HdcoMR5JJZg08UNuiXOOZ+rUEl0Ox2ZqnGEOcUO2DU9XcfhWeJxkWFcEXTP4i9QANc mOMnvTxD8UjY/WNtgSHVBMO/mIuchB4qfjaOq6oh5BKvKHDUdtbP/5ECjdMaiTQlSdTK aUWDoFX83ZTTIEtrqtxmu7nGBxcG1yrMUGliuucUxE1WGi2RekLUUeuZSFTSOexpYULY U6ZFi+4i2/tFCY3kxdieDS9O0AePM75eJ0cmxCo+1xqDakpt76yvo3XZAqMKPUgsSt1R hjp5Qr1LJSAaEi+ynP2Vcfd4GJaCtQcGaY7SitUIcuzmEM4IWiHDSEuNs1+mPbLbl6em m6Gg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=W01NZ7QUfBLqtcCZYG+SSUZHtF8Ve5d1BU4C4/esYac=; fh=/eTNpnw2EeTHjhijYum+630E555qx72OsXXBJXWDNVo=; b=YJY8cVQMM+AjzqpWYKFxj6x2amDIeBfNPVjm1P2RatGfor3ZHs6YLvispxpiIHuG+i MK/TTkLSUu49ahxwUYoSqQjKYU7qXuFUxNbxaZvgeHG5dvt1oD3v+s26TzoA5jlgAEKy nznZQRXwK7vqJmfKBma1ytd66a5rottCOswGqBg918nnziKQtvIxORo5RRmuVnKcDqYv n9dCNX/CzPgIjxcrKdVQOLBKJzuL18doUNke+pxpOo7QlHLhCnHJyF7WKDVBzssEgkLI SpRmmPmBuY5f0UsHnhaFVHiosWyWFF3PW+oIPgugFThwuvBQmmah/yg1ORHtNeNWfUby qLVQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i10-20020a1709061cca00b00992f30b2983si2452769ejh.849.2023.07.21.14.25.49; Fri, 21 Jul 2023 14:26:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231189AbjGUVN6 (ORCPT + 99 others); Fri, 21 Jul 2023 17:13:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229866AbjGUVNp (ORCPT ); Fri, 21 Jul 2023 17:13:45 -0400 Received: from mx.skole.hr (mx2.hosting.skole.hr [161.53.165.186]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EFAC30E2; Fri, 21 Jul 2023 14:13:16 -0700 (PDT) Received: from mx2.hosting.skole.hr (localhost.localdomain [127.0.0.1]) by mx.skole.hr (mx.skole.hr) with ESMTP id 2EFD888092; Fri, 21 Jul 2023 23:06:11 +0200 (CEST) From: =?utf-8?q?Duje_Mihanovi=C4=87?= To: Robert Jarzmik , Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, afaerber@suse.com, =?utf-8?q?Duje_Mihanovi=C4=87?= Subject: [PATCH 02/10] gpio: pxa: use dynamic allocation of base Date: Fri, 21 Jul 2023 22:37:44 +0200 Message-ID: <20230721210042.21535-3-duje.mihanovic@skole.hr> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230721210042.21535-1-duje.mihanovic@skole.hr> References: <20230721210042.21535-1-duje.mihanovic@skole.hr> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772066988094500841 X-GMAIL-MSGID: 1772066988094500841 Fixes the warning in dmesg that static allocation of the base is deprecated. Signed-off-by: Duje Mihanović --- drivers/gpio/gpio-pxa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c index a1630ed4b741..076ee6dff4d5 100644 --- a/drivers/gpio/gpio-pxa.c +++ b/drivers/gpio/gpio-pxa.c @@ -350,6 +350,7 @@ static int pxa_init_gpio_chip(struct pxa_gpio_chip *pchip, int ngpio, void __iom pchip->chip.parent = pchip->dev; pchip->chip.label = "gpio-pxa"; + pchip->chip.base = -1; pchip->chip.direction_input = pxa_gpio_direction_input; pchip->chip.direction_output = pxa_gpio_direction_output; pchip->chip.get = pxa_gpio_get; From patchwork Fri Jul 21 20:37:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Duje_Mihanovi=C4=87?= X-Patchwork-Id: 124102 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp469779vqg; Fri, 21 Jul 2023 14:19:00 -0700 (PDT) X-Google-Smtp-Source: APBJJlHFAvXweiy4Gnhq+KUq7YDrD1gcK3FYXoJBEq2iwNjPqi4zY083hZlxGhyzfQv89hbiQOAt X-Received: by 2002:a19:4f54:0:b0:4f8:65ef:afcd with SMTP id a20-20020a194f54000000b004f865efafcdmr2028379lfk.17.1689974340504; Fri, 21 Jul 2023 14:19:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689974340; cv=none; d=google.com; s=arc-20160816; b=Ja5v89GY/vgfG4DG0fx38MyooShff9TovWw4Qa4tl3uujhDKweVkOv5Uc3+Gfs73lk X7Z2s1u+dLMMQTmGGjGpcEjn77p36IOdMUfLEv4C2zP6HX6FfoUxfOonGu5zEEIDjZSY kZ5kInnjllefVH7MJAnXos8/Z2pAD8jdiMVYVlmRk+objejoiaviVigzkdQ7XDClr+LU nK998jOsULBRZ4I2/iEllJWLauOpU9tmC6/gtGtlIINw+j9vAKKi3/7HcfY7VrJdRCRD Un3VzaxPxKGIoJ5UJ51cg4YvF1n5jJHJrticdyXTK4vpeP/b7g/rmz8bRa7IQCTRwaOQ K18g== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=MqqrokDCcJRq7WqiFjaB30QQAUeL5m6yDxg4HY2j0vI=; fh=/eTNpnw2EeTHjhijYum+630E555qx72OsXXBJXWDNVo=; b=wcaLBwOLEsl9tGyozkbH+mOBWoxBo1q22RmDnpeQk3R8eqx+VZGS6YxJp4M4qG9g25 U6ojaVVfUNGWY+ejiZ0ptWocrh2IOoVuUPHN1zgyiwORDhiqBZ+wyonEkoryMSXgFjsf UUNzQoCGVFXC9d5xvm3eOHsscDnuahE9vtP+YiVQlLLXXh6s2h1TTtn3Zjl29mYf7qxP L4CFbL40aCEEA+uQkktWhjvfVI2HkoMN/610wqMkY8PGf9HGMzXH3Xc7wuUHV9DPV/We ISdg+W8fvgDU7FEldZm4DyVg1I5CXtuwzr2kYg9YPPc/E0GTUV3F1zl/racjW0+SRgct Tf+A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c1-20020aa7c981000000b0051be93a4395si2757831edt.52.2023.07.21.14.18.34; Fri, 21 Jul 2023 14:19:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230223AbjGUVML (ORCPT + 99 others); Fri, 21 Jul 2023 17:12:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230078AbjGUVMD (ORCPT ); Fri, 21 Jul 2023 17:12:03 -0400 X-Greylist: delayed 344 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 21 Jul 2023 14:11:57 PDT Received: from mx.skole.hr (mx1.hosting.skole.hr [161.53.165.185]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D26E359C; Fri, 21 Jul 2023 14:11:57 -0700 (PDT) Received: from mx1.hosting.skole.hr (localhost.localdomain [127.0.0.1]) by mx.skole.hr (mx.skole.hr) with ESMTP id 8B8B486D1B; Fri, 21 Jul 2023 23:06:11 +0200 (CEST) From: =?utf-8?q?Duje_Mihanovi=C4=87?= To: Robert Jarzmik , Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, afaerber@suse.com, =?utf-8?q?Duje_Mihanovi=C4=87?= Subject: [PATCH 03/10] gpio: pxa: make pxa_gpio_has_pinctrl return false for MMP_GPIO Date: Fri, 21 Jul 2023 22:37:45 +0200 Message-ID: <20230721210042.21535-4-duje.mihanovic@skole.hr> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230721210042.21535-1-duje.mihanovic@skole.hr> References: <20230721210042.21535-1-duje.mihanovic@skole.hr> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772066533959936523 X-GMAIL-MSGID: 1772066533959936523 Fixes the incorrect assumption that mmp-gpio needs a pinctrl handle, causing devices consuming GPIO to be indefinitely deferred. Signed-off-by: Duje Mihanović --- drivers/gpio/gpio-pxa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c index 076ee6dff4d5..b48d142b736d 100644 --- a/drivers/gpio/gpio-pxa.c +++ b/drivers/gpio/gpio-pxa.c @@ -238,6 +238,7 @@ static bool pxa_gpio_has_pinctrl(void) switch (gpio_type) { case PXA3XX_GPIO: case MMP2_GPIO: + case MMP_GPIO: return false; default: From patchwork Fri Jul 21 20:37:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Duje_Mihanovi=C4=87?= X-Patchwork-Id: 124108 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp474267vqg; Fri, 21 Jul 2023 14:27:32 -0700 (PDT) X-Google-Smtp-Source: APBJJlFDtZGjzFar8oCn+uJ8GQHPDGR6steakdOijakDssQWch6ofmSFStpu6oKMoK7dhUUbCg2A X-Received: by 2002:a17:907:2cf6:b0:99b:5c3c:3e61 with SMTP id hz22-20020a1709072cf600b0099b5c3c3e61mr2635720ejc.1.1689974851919; Fri, 21 Jul 2023 14:27:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689974851; cv=none; d=google.com; s=arc-20160816; b=yeCOhsdLHE14m4wW2mtCy0EpEi4HSPl5cLRkbJ+Gfeh+LW4xSfYbmu4sjJafM3X1PR s4YOBbWUNk/UV4hvOwpCD/kFQxmwd+V7qQScSKaM8j0RFSFmztcPGyV4dcYbwKII54LE O7Xz8qxVrPt8s7E5CRqLccD1lad+i5udQWCQ+cLODs6BVI9t/9wsGLx1YgyxkA9RmG19 tmVaD7m+QQv/tjeWApiwh6L/Zoqej8l1LsNuFg0E2JVq/yH3GXRvLR5j9M6ePBwuFSqf hLio12YV5Iowsv6jsKw5Tw7b/0e3yzjBGhhoTuiKTYqqCFw9uihUtqhDM4EG/V5yDxeU pRyw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=9QX4QuonTtvFKXXqR8QFOIQSt05acI8amewj78oBNAA=; fh=TTs3zG+mH4lalkuNxZjG2EmgYpeGB7qon+cS82GQd9U=; b=DSnUYIllp0fZsVax6SVksztGSgFKwxPTT9VnBSitQFalVrntsVDndI27kFKDVcZrys SFAVV71WitIQ7mDZdc7+4EbYYq9hKi/ImhnoTOAYMAHmKrSEfKrQx5nlhK29H299HVpZ txXNMIGYerL2oO6qKlSmUxNeDov/y+WFOb46nLLimfxkZwvYj3iRpxZStBd97A5oFun5 a29izYR+R/p/mrzTINvh1+D+H/t1uhtVtLiAccWB/qNqavxcC2hdOldng3JTJ1ZoSEmX xfThbbjPbgBX/aPbDK82Wfq81bzGTG4LaNMnvuEiP4ls+JMrnDabp6EJooRkjuHsXQ3J Ctzg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f21-20020a170906391500b00997bd26a559si2649143eje.881.2023.07.21.14.27.07; Fri, 21 Jul 2023 14:27:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231264AbjGUVOA (ORCPT + 99 others); Fri, 21 Jul 2023 17:14:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230128AbjGUVNr (ORCPT ); Fri, 21 Jul 2023 17:13:47 -0400 Received: from mx.skole.hr (mx2.hosting.skole.hr [161.53.165.186]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F01B359F; Fri, 21 Jul 2023 14:13:16 -0700 (PDT) Received: from mx2.hosting.skole.hr (localhost.localdomain [127.0.0.1]) by mx.skole.hr (mx.skole.hr) with ESMTP id DF505880BF; Fri, 21 Jul 2023 23:06:12 +0200 (CEST) From: =?utf-8?q?Duje_Mihanovi=C4=87?= To: Michael Turquette , Stephen Boyd , =?utf-8?q?Duje_Mihanovi=C4=87?= , linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, afaerber@suse.com Subject: [PATCH 04/10] clk: mmp: Add Marvell PXA1908 clock driver Date: Fri, 21 Jul 2023 22:37:46 +0200 Message-ID: <20230721210042.21535-5-duje.mihanovic@skole.hr> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230721210042.21535-1-duje.mihanovic@skole.hr> References: <20230721210042.21535-1-duje.mihanovic@skole.hr> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772067070424767931 X-GMAIL-MSGID: 1772067070424767931 Add driver for Marvell PXA1908 clock controller blocks. The SoC has numerous clock controller blocks, currently supporting APBC, APBCP, MPMU and APMU. Signed-off-by: Duje Mihanović --- drivers/clk/mmp/Makefile | 2 +- drivers/clk/mmp/clk-of-pxa1908.c | 282 +++++++++++++++++++++++++++++++ 2 files changed, 283 insertions(+), 1 deletion(-) create mode 100644 drivers/clk/mmp/clk-of-pxa1908.c diff --git a/drivers/clk/mmp/Makefile b/drivers/clk/mmp/Makefile index cbcc2f8430a2..feacddb28fc4 100644 --- a/drivers/clk/mmp/Makefile +++ b/drivers/clk/mmp/Makefile @@ -15,4 +15,4 @@ obj-$(CONFIG_CPU_PXA168) += clk-pxa168.o obj-$(CONFIG_CPU_PXA910) += clk-pxa910.o obj-$(CONFIG_CPU_MMP2) += clk-mmp2.o -obj-y += clk-of-pxa1928.o +obj-$(CONFIG_ARCH_MMP) += clk-of-pxa1928.o clk-of-pxa1908.o diff --git a/drivers/clk/mmp/clk-of-pxa1908.c b/drivers/clk/mmp/clk-of-pxa1908.c new file mode 100644 index 000000000000..58b3beca7b02 --- /dev/null +++ b/drivers/clk/mmp/clk-of-pxa1908.c @@ -0,0 +1,282 @@ +// SPDX-License-Identifier: GPL-2.0-only +#include +#include + +#include + +#include "clk.h" + +#define APBC_INDEX_TO_OFFSET(n) ((n - 1) * 4) + +#define APMU_CLK_GATE_CTRL 0x40 +#define MPMU_UART_PLL 0x14 + +struct pxa1908_clk_unit { + struct mmp_clk_unit unit; + void __iomem *mpmu_base; + void __iomem *apmu_base; + void __iomem *apbc_base; + void __iomem *apbcp_base; + void __iomem *apbs_base; + void __iomem *ciu_base; +}; + +static struct mmp_param_fixed_rate_clk fixed_rate_clks[] = { + {PXA1908_CLK_CLK32, "clk32", NULL, 0, 32768}, + {PXA1908_CLK_VCTCXO, "vctcxo", NULL, 0, 26000000}, + {PXA1908_CLK_PLL1_624, "pll1_624", NULL, 0, 624000000}, + {PXA1908_CLK_PLL1_416, "pll1_416", NULL, 0, 416000000}, + {PXA1908_CLK_PLL1_499, "pll1_499", NULL, 0, 499000000}, + {PXA1908_CLK_PLL1_832, "pll1_832", NULL, 0, 832000000}, + {PXA1908_CLK_PLL1_1248, "pll1_1248", NULL, 0, 1248000000}, +}; + +static struct mmp_param_fixed_factor_clk fixed_factor_clks[] = { + {PXA1908_CLK_PLL1_D2, "pll1_d2", "pll1_624", 1, 2, 0}, + {PXA1908_CLK_PLL1_D4, "pll1_d4", "pll1_d2", 1, 2, 0}, + {PXA1908_CLK_PLL1_D6, "pll1_d6", "pll1_d2", 1, 3, 0}, + {PXA1908_CLK_PLL1_D8, "pll1_d8", "pll1_d4", 1, 2, 0}, + {PXA1908_CLK_PLL1_D12, "pll1_d12", "pll1_d6", 1, 2, 0}, + {PXA1908_CLK_PLL1_D13, "pll1_d13", "pll1_624", 1, 13, 0}, + {PXA1908_CLK_PLL1_D16, "pll1_d16", "pll1_d8", 1, 2, 0}, + {PXA1908_CLK_PLL1_D24, "pll1_d24", "pll1_d12", 1, 2, 0}, + {PXA1908_CLK_PLL1_D48, "pll1_d48", "pll1_d24", 1, 2, 0}, + {PXA1908_CLK_PLL1_D96, "pll1_d96", "pll1_d48", 1, 2, 0}, + {PXA1908_CLK_PLL1_32, "pll1_32", "pll1_d13", 2, 3, 0}, + {PXA1908_CLK_PLL1_208, "pll1_208", "pll1_d2", 2, 3, 0}, + {PXA1908_CLK_PLL1_117, "pll1_117", "pll1_624", 3, 16, 0}, +}; + +static struct mmp_clk_factor_masks uart_factor_masks = { + .factor = 2, + .num_mask = 0x1fff, + .den_mask = 0x1fff, + .num_shift = 16, + .den_shift = 0, +}; + +static struct mmp_clk_factor_tbl uart_factor_tbl[] = { + {.num = 8125, .den = 1536}, /* 14.745MHz */ +}; + +static DEFINE_SPINLOCK(pll1_lock); +static struct mmp_param_general_gate_clk pll1_gate_clks[] = { + {PXA1908_CLK_PLL1_D2_GATE, "pll1_d2_gate", "pll1_d2", 0, APMU_CLK_GATE_CTRL, 29, 0, &pll1_lock}, + {PXA1908_CLK_PLL1_416_GATE, "pll1_416_gate", "pll1_416", 0, APMU_CLK_GATE_CTRL, 27, 0, &pll1_lock}, + {PXA1908_CLK_PLL1_624_GATE, "pll1_624_gate", "pll1_624", 0, APMU_CLK_GATE_CTRL, 26, 0, &pll1_lock}, + {PXA1908_CLK_PLL1_832_GATE, "pll1_832_gate", "pll1_832", 0, APMU_CLK_GATE_CTRL, 30, 0, &pll1_lock}, + {PXA1908_CLK_PLL1_1248_GATE, "pll1_1248_gate", "pll1_1248", 0, APMU_CLK_GATE_CTRL, 28, 0, &pll1_lock}, +}; + +static void pxa1908_pll_init(struct pxa1908_clk_unit *pxa_unit) +{ + struct mmp_clk_unit *unit = &pxa_unit->unit; + + mmp_register_fixed_rate_clks(unit, fixed_rate_clks, + ARRAY_SIZE(fixed_rate_clks)); + + mmp_register_fixed_factor_clks(unit, fixed_factor_clks, + ARRAY_SIZE(fixed_factor_clks)); + + mmp_clk_register_factor("uart_pll", "pll1_d4", + CLK_SET_RATE_PARENT, + pxa_unit->mpmu_base + MPMU_UART_PLL, + &uart_factor_masks, uart_factor_tbl, + ARRAY_SIZE(uart_factor_tbl), NULL); + +} + +static DEFINE_SPINLOCK(pwm0_lock); +static DEFINE_SPINLOCK(pwm2_lock); + +static DEFINE_SPINLOCK(uart0_lock); +static DEFINE_SPINLOCK(uart1_lock); +static DEFINE_SPINLOCK(uart2_lock); + +static const char * const uart_parent_names[] = {"pll1_117", "uart_pll"}; +static const char * const ssp_parent_names[] = {"pll1_d16", "pll1_d48", "pll1_d24", "pll1_d12"}; + +static struct mmp_param_gate_clk apbc_gate_clks[] = { + {PXA1908_CLK_TWSI0, "twsi0_clk", "pll1_32", CLK_SET_RATE_PARENT, APBC_INDEX_TO_OFFSET(PXA1908_CLK_TWSI0), 0x7, 3, 0, 0, NULL}, + {PXA1908_CLK_TWSI1, "twsi1_clk", "pll1_32", CLK_SET_RATE_PARENT, APBC_INDEX_TO_OFFSET(PXA1908_CLK_TWSI1), 0x7, 3, 0, 0, NULL}, + {PXA1908_CLK_TWSI3, "twsi3_clk", "pll1_32", CLK_SET_RATE_PARENT, APBC_INDEX_TO_OFFSET(PXA1908_CLK_TWSI3), 0x7, 3, 0, 0, NULL}, + {PXA1908_CLK_GPIO, "gpio_clk", "vctcxo", CLK_SET_RATE_PARENT, APBC_INDEX_TO_OFFSET(PXA1908_CLK_GPIO), 0x7, 3, 0, 0, NULL}, + {PXA1908_CLK_KPC, "kpc_clk", "clk32", CLK_SET_RATE_PARENT, APBC_INDEX_TO_OFFSET(PXA1908_CLK_KPC), 0x7, 3, 0, MMP_CLK_GATE_NEED_DELAY, NULL}, + {PXA1908_CLK_RTC, "rtc_clk", "clk32", CLK_SET_RATE_PARENT, APBC_INDEX_TO_OFFSET(PXA1908_CLK_RTC), 0x87, 0x83, 0, MMP_CLK_GATE_NEED_DELAY, NULL}, + {PXA1908_CLK_PWM0, "pwm0_clk", "pwm01_apb_share", CLK_SET_RATE_PARENT, APBC_INDEX_TO_OFFSET(PXA1908_CLK_PWM0), 0x2, 2, 0, 0, &pwm0_lock}, + {PXA1908_CLK_PWM1, "pwm1_clk", "pwm01_apb_share", CLK_SET_RATE_PARENT, APBC_INDEX_TO_OFFSET(PXA1908_CLK_PWM1), 0x6, 2, 0, 0, NULL}, + {PXA1908_CLK_PWM2, "pwm2_clk", "pwm23_apb_share", CLK_SET_RATE_PARENT, APBC_INDEX_TO_OFFSET(PXA1908_CLK_PWM2), 0x2, 2, 0, 0, NULL}, + {PXA1908_CLK_PWM3, "pwm3_clk", "pwm23_apb_share", CLK_SET_RATE_PARENT, APBC_INDEX_TO_OFFSET(PXA1908_CLK_PWM3), 0x6, 2, 0, 0, NULL}, + {PXA1908_CLK_UART0, "uart0_clk", "uart0_mux", CLK_SET_RATE_PARENT, APBC_INDEX_TO_OFFSET(PXA1908_CLK_UART0), 0x7, 3, 0, 0, &uart0_lock}, + {PXA1908_CLK_UART1, "uart1_clk", "uart1_mux", CLK_SET_RATE_PARENT, APBC_INDEX_TO_OFFSET(PXA1908_CLK_UART1), 0x7, 3, 0, 0, &uart1_lock}, +}; + +static struct mmp_param_mux_clk apbc_mux_clks[] = { + {0, "uart0_mux", uart_parent_names, ARRAY_SIZE(uart_parent_names), CLK_SET_RATE_PARENT, APBC_INDEX_TO_OFFSET(PXA1908_CLK_UART0), 4, 3, 0, &uart0_lock}, + {0, "uart1_mux", uart_parent_names, ARRAY_SIZE(uart_parent_names), CLK_SET_RATE_PARENT, APBC_INDEX_TO_OFFSET(PXA1908_CLK_UART1), 4, 3, 0, &uart1_lock}, + {0, "ssp0_mux", ssp_parent_names, ARRAY_SIZE(ssp_parent_names), 0, APBC_INDEX_TO_OFFSET(PXA1908_CLK_SSP0), 4, 3, 0, NULL}, + {0, "ssp2_mux", ssp_parent_names, ARRAY_SIZE(ssp_parent_names), 0, APBC_INDEX_TO_OFFSET(PXA1908_CLK_SSP2), 4, 3, 0, NULL}, +}; + +static void pxa1908_apb_periph_clk_init(struct pxa1908_clk_unit *pxa_unit) +{ + struct mmp_clk_unit *unit = &pxa_unit->unit; + + mmp_clk_register_gate(NULL, "pwm01_apb_share", "pll1_d48", + CLK_SET_RATE_PARENT, + pxa_unit->apbc_base + PXA1908_CLK_PWM0 * 4, + 0x5, 1, 0, 0, &pwm0_lock); + mmp_clk_register_gate(NULL, "pwm23_apb_share", "pll1_d48", + CLK_SET_RATE_PARENT, + pxa_unit->apbc_base + PXA1908_CLK_PWM2 * 4, + 0x5, 1, 0, 0, &pwm2_lock); + mmp_register_mux_clks(unit, apbc_mux_clks, pxa_unit->apbc_base, + ARRAY_SIZE(apbc_mux_clks)); + mmp_register_gate_clks(unit, apbc_gate_clks, pxa_unit->apbc_base, + ARRAY_SIZE(apbc_gate_clks)); +} + +static struct mmp_param_gate_clk apbcp_gate_clks[] = { + {PXA1908_CLK_UART2, "uart2_clk", "uart2_mux", CLK_SET_RATE_PARENT, PXA1908_CLK_UART2 * 4, 0x7, 0x3, 0x0, 0, &uart2_lock}, + {PXA1908_CLK_TWSI2, "twsi2_clk", "pll1_32", CLK_SET_RATE_PARENT, PXA1908_CLK_TWSI2 * 4, 0x7, 0x3, 0x0, 0, NULL}, + {PXA1908_CLK_AICER, "ripc_clk", NULL, 0, PXA1908_CLK_AICER * 4, 0x7, 0x2, 0x0, 0, NULL}, +}; + +static struct mmp_param_mux_clk apbcp_mux_clks[] = { + {0, "uart2_mux", uart_parent_names, ARRAY_SIZE(uart_parent_names), CLK_SET_RATE_PARENT, PXA1908_CLK_UART2 * 4, 4, 3, 0, &uart2_lock}, +}; + +static void pxa1908_apb_p_periph_clk_init(struct pxa1908_clk_unit *pxa_unit) +{ + struct mmp_clk_unit *unit = &pxa_unit->unit; + + mmp_register_mux_clks(unit, apbcp_mux_clks, pxa_unit->apbcp_base, + ARRAY_SIZE(apbcp_mux_clks)); + mmp_register_gate_clks(unit, apbcp_gate_clks, pxa_unit->apbcp_base, + ARRAY_SIZE(apbcp_gate_clks)); +} + +static DEFINE_SPINLOCK(sdh0_lock); +static DEFINE_SPINLOCK(sdh1_lock); +static DEFINE_SPINLOCK(sdh2_lock); + +static const char * const sdh_parent_names[] = {"pll1_416", "pll1_624"}; + +static struct mmp_clk_mix_config sdh_mix_config = { + .reg_info = DEFINE_MIX_REG_INFO(3, 8, 2, 6, 11), +}; + +static struct mmp_param_gate_clk apmu_gate_clks[] = { + {PXA1908_CLK_USB, "usb_clk", NULL, 0, PXA1908_CLK_USB * 4, 0x9, 0x9, 0x1, 0, NULL}, + {PXA1908_CLK_SDH0, "sdh0_clk", "sdh0_mix_clk", CLK_SET_RATE_PARENT | CLK_SET_RATE_UNGATE, PXA1908_CLK_SDH0 * 4, 0x12, 0x12, 0x0, 0, &sdh0_lock}, + {PXA1908_CLK_SDH1, "sdh1_clk", "sdh1_mix_clk", CLK_SET_RATE_PARENT | CLK_SET_RATE_UNGATE, PXA1908_CLK_SDH1 * 4, 0x12, 0x12, 0x0, 0, &sdh1_lock}, + {PXA1908_CLK_SDH2, "sdh2_clk", "sdh2_mix_clk", CLK_SET_RATE_PARENT | CLK_SET_RATE_UNGATE, PXA1908_CLK_SDH2 * 4, 0x12, 0x12, 0x0, 0, &sdh2_lock} +}; + +static void pxa1908_axi_periph_clk_init(struct pxa1908_clk_unit *pxa_unit) +{ + struct mmp_clk_unit *unit = &pxa_unit->unit; + + mmp_register_general_gate_clks(unit, pll1_gate_clks, + pxa_unit->apmu_base, ARRAY_SIZE(pll1_gate_clks)); + + sdh_mix_config.reg_info.reg_clk_ctrl = pxa_unit->apmu_base + PXA1908_CLK_SDH0 * 4; + mmp_clk_register_mix(NULL, "sdh0_mix_clk", sdh_parent_names, + ARRAY_SIZE(sdh_parent_names), CLK_SET_RATE_PARENT, + &sdh_mix_config, &sdh0_lock); + sdh_mix_config.reg_info.reg_clk_ctrl = pxa_unit->apmu_base + PXA1908_CLK_SDH1 * 4; + mmp_clk_register_mix(NULL, "sdh1_mix_clk", sdh_parent_names, + ARRAY_SIZE(sdh_parent_names), CLK_SET_RATE_PARENT, + &sdh_mix_config, &sdh1_lock); + sdh_mix_config.reg_info.reg_clk_ctrl = pxa_unit->apmu_base + PXA1908_CLK_SDH2 * 4; + mmp_clk_register_mix(NULL, "sdh2_mix_clk", sdh_parent_names, + ARRAY_SIZE(sdh_parent_names), CLK_SET_RATE_PARENT, + &sdh_mix_config, &sdh2_lock); + + mmp_register_gate_clks(unit, apmu_gate_clks, pxa_unit->apmu_base, + ARRAY_SIZE(apmu_gate_clks)); +} + +static void __init pxa1908_apbc_clk_init(struct device_node *np) +{ + struct pxa1908_clk_unit *pxa_unit; + + pxa_unit = kzalloc(sizeof(*pxa_unit), GFP_KERNEL); + if (!pxa_unit) + return; + + pxa_unit->apbc_base = of_iomap(np, 0); + if (!pxa_unit->apbc_base) { + pr_err("failed to map apbc registers\n"); + kfree(pxa_unit); + return; + } + + mmp_clk_init(np, &pxa_unit->unit, PXA1908_APBC_NR_CLKS); + + pxa1908_apb_periph_clk_init(pxa_unit); +} +CLK_OF_DECLARE(pxa1908_apbc, "marvell,pxa1908-apbc", pxa1908_apbc_clk_init); + +static void __init pxa1908_apbcp_clk_init(struct device_node *np) +{ + struct pxa1908_clk_unit *pxa_unit; + + pxa_unit = kzalloc(sizeof(*pxa_unit), GFP_KERNEL); + if (!pxa_unit) + return; + + pxa_unit->apbcp_base = of_iomap(np, 0); + if (!pxa_unit->apbcp_base) { + pr_err("failed to map apbcp registers\n"); + kfree(pxa_unit); + return; + } + + mmp_clk_init(np, &pxa_unit->unit, PXA1908_APBCP_NR_CLKS); + + pxa1908_apb_p_periph_clk_init(pxa_unit); +} +CLK_OF_DECLARE(pxa1908_apbcp, "marvell,pxa1908-apbcp", pxa1908_apbcp_clk_init); + +static void __init pxa1908_mpmu_clk_init(struct device_node *np) +{ + struct pxa1908_clk_unit *pxa_unit; + + pxa_unit = kzalloc(sizeof(*pxa_unit), GFP_KERNEL); + if (!pxa_unit) + return; + + pxa_unit->mpmu_base = of_iomap(np, 0); + if (!pxa_unit->mpmu_base) { + pr_err("failed to map mpmu registers\n"); + kfree(pxa_unit); + return; + } + + mmp_clk_init(np, &pxa_unit->unit, PXA1908_MPMU_NR_CLKS); + + pxa1908_pll_init(pxa_unit); +} +CLK_OF_DECLARE(pxa1908_mpmu, "marvell,pxa1908-mpmu", pxa1908_mpmu_clk_init); + +static void __init pxa1908_apmu_clk_init(struct device_node *np) +{ + struct pxa1908_clk_unit *pxa_unit; + + pxa_unit = kzalloc(sizeof(*pxa_unit), GFP_KERNEL); + if (!pxa_unit) + return; + + pxa_unit->apmu_base = of_iomap(np, 0); + if (!pxa_unit->apmu_base) { + pr_err("failed to map apmu registers\n"); + kfree(pxa_unit); + return; + } + + mmp_clk_init(np, &pxa_unit->unit, PXA1908_APMU_NR_CLKS); + + pxa1908_axi_periph_clk_init(pxa_unit); +} +CLK_OF_DECLARE(pxa1908_apmu, "marvell,pxa1908-apmu", pxa1908_apmu_clk_init); From patchwork Fri Jul 21 20:37:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Duje_Mihanovi=C4=87?= X-Patchwork-Id: 124107 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp473921vqg; Fri, 21 Jul 2023 14:26:47 -0700 (PDT) X-Google-Smtp-Source: APBJJlGMiWslpcFS0XaSwA1MOPg3TLF2p/8H43oTTw1qjP4RMDQ02uUlfAVAHG7RazBGBnefQkf1 X-Received: by 2002:ac2:5dee:0:b0:4fb:99c6:8533 with SMTP id z14-20020ac25dee000000b004fb99c68533mr2170460lfq.33.1689974806986; Fri, 21 Jul 2023 14:26:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689974806; cv=none; d=google.com; s=arc-20160816; b=InDShyIvMmoHUwrQI3IV7kghvEmab7Ono7QhjOiQMd1stxAlzvg4xsZaFSNsrqoikD cskSY7IP5KNJ63LXa5vGkttYvu333u2XhZf9ANCHtfpkB//85Rlk9XoFCxjyLqu+7ROi YATuj8s5ObknCetiWzHGdqHOmwE+1+iya/G8ao2fcnWrizM+QBOrUN5cEULoCXPa4kZC tYA4r2CQNbYK/XFUNqvFKwiNdwfRUTxhrlanMlt6VLNw1SqC9H4lhRsmPiaSW7GSkAMN n+XZsllIBvQMfqk/dXyJLUXjspUfDg91dl/CdNQll9cMIniSeg+z1ETnu5WhKdJcK3ML L3Nw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=i3cg5gaRCKB79qNQWR+zdG885sHaGrS1Fk+eQ+DPfQc=; fh=gKWSy5atPtVW3X3sVBL0bWn44SKBNIVbibs5UiQZiMY=; b=kcF8lXMHc6KybAv2khusbtMeL1PyZj4js6BoyP1s7CqeoUHdT2kjR5oggSVa0zKNE5 NrwvhM66yUvX1IT8oPo0VeqXiNBimo6TJdUS5fCdSwwosTzPgYeHifkR+iondrk8Nb+u PNVquji/wU1Z2tCXLCcvFqSlAzLJ3FBxGuRXhvLXr+NazKjpLGFqvSMLVgdWhcIJcTgo kWBJBRqhahyV5fKNNonbIZq6ckk/zDV+WLcLkRhzef836vTZd6ihv8Ls4ggNXDsx12i1 frnJCOUHhSODhCh1EQjICRmMJFHV5ekHEp+mz4rFLWfcDUlBnn3tNsEenYV06RwDpR7x HQpw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z23-20020aa7c657000000b0051e0fbcde2dsi2748134edr.620.2023.07.21.14.26.23; Fri, 21 Jul 2023 14:26:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229981AbjGUVMJ (ORCPT + 99 others); Fri, 21 Jul 2023 17:12:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229766AbjGUVMD (ORCPT ); Fri, 21 Jul 2023 17:12:03 -0400 X-Greylist: delayed 340 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 21 Jul 2023 14:11:57 PDT Received: from mx.skole.hr (mx1.hosting.skole.hr [161.53.165.185]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D19B30ED; Fri, 21 Jul 2023 14:11:57 -0700 (PDT) Received: from mx1.hosting.skole.hr (localhost.localdomain [127.0.0.1]) by mx.skole.hr (mx.skole.hr) with ESMTP id D31C586D1D; Fri, 21 Jul 2023 23:06:12 +0200 (CEST) From: =?utf-8?q?Duje_Mihanovi=C4=87?= To: =?utf-8?q?Duje_Mihanovi=C4=87?= , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, afaerber@suse.com Subject: [PATCH 05/10] dt-bindings: clock: Add Marvell PXA1908 clock bindings Date: Fri, 21 Jul 2023 22:37:47 +0200 Message-ID: <20230721210042.21535-6-duje.mihanovic@skole.hr> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230721210042.21535-1-duje.mihanovic@skole.hr> References: <20230721210042.21535-1-duje.mihanovic@skole.hr> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772067022927093843 X-GMAIL-MSGID: 1772067022927093843 Add the dt bindings for Marvell PXA1908 clock controller. Signed-off-by: Duje Mihanović --- include/dt-bindings/clock/marvell,pxa1908.h | 93 +++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 include/dt-bindings/clock/marvell,pxa1908.h diff --git a/include/dt-bindings/clock/marvell,pxa1908.h b/include/dt-bindings/clock/marvell,pxa1908.h new file mode 100644 index 000000000000..da9c5d499ae4 --- /dev/null +++ b/include/dt-bindings/clock/marvell,pxa1908.h @@ -0,0 +1,93 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __DTS_MARVELL_PXA1908_CLOCK_H +#define __DTS_MARVELL_PXA1908_CLOCK_H + +/* plls */ +#define PXA1908_CLK_CLK32 0x1 +#define PXA1908_CLK_VCTCXO 0x2 +#define PXA1908_CLK_PLL1_624 0x3 +#define PXA1908_CLK_PLL1_416 0x4 +#define PXA1908_CLK_PLL1_499 0x5 +#define PXA1908_CLK_PLL1_832 0x6 +#define PXA1908_CLK_PLL1_1248 0x7 +#define PXA1908_CLK_PLL1_D2 0x8 +#define PXA1908_CLK_PLL1_D4 0x9 +#define PXA1908_CLK_PLL1_D8 0xa +#define PXA1908_CLK_PLL1_D16 0xb +#define PXA1908_CLK_PLL1_D6 0xc +#define PXA1908_CLK_PLL1_D12 0xd +#define PXA1908_CLK_PLL1_D24 0xe +#define PXA1908_CLK_PLL1_D48 0xf +#define PXA1908_CLK_PLL1_D96 0x10 +#define PXA1908_CLK_PLL1_D13 0x11 +#define PXA1908_CLK_PLL1_32 0x12 +#define PXA1908_CLK_PLL1_208 0x13 +#define PXA1908_CLK_PLL1_117 0x14 +#define PXA1908_CLK_PLL1_416_GATE 0x15 +#define PXA1908_CLK_PLL1_624_GATE 0x16 +#define PXA1908_CLK_PLL1_832_GATE 0x17 +#define PXA1908_CLK_PLL1_1248_GATE 0x18 +#define PXA1908_CLK_PLL1_D2_GATE 0x19 +#define PXA1908_CLK_PLL1_499_EN 0x1a +#define PXA1908_CLK_PLL2VCO 0x1b +#define PXA1908_CLK_PLL2 0x1c +#define PXA1908_CLK_PLL2P 0x1d +#define PXA1908_CLK_PLL2VCODIV3 0x1e +#define PXA1908_CLK_PLL3VCO 0x1f +#define PXA1908_CLK_PLL3 0x20 +#define PXA1908_CLK_PLL3P 0x21 +#define PXA1908_CLK_PLL3VCODIV3 0x22 +#define PXA1908_CLK_PLL4VCO 0x23 +#define PXA1908_CLK_PLL4 0x24 +#define PXA1908_CLK_PLL4P 0x25 +#define PXA1908_CLK_PLL4VCODIV3 0x26 +#define PXA1908_MPMU_NR_CLKS 38 + +/* apb (apbc) peripherals */ +#define PXA1908_CLK_UART0 0x1 +#define PXA1908_CLK_UART1 0x2 +#define PXA1908_CLK_GPIO 0x3 +#define PXA1908_CLK_PWM0 0x4 +#define PXA1908_CLK_PWM1 0x5 +#define PXA1908_CLK_PWM2 0x6 +#define PXA1908_CLK_PWM3 0x7 +#define PXA1908_CLK_SSP0 0x8 +#define PXA1908_CLK_SSP1 0x9 +#define PXA1908_CLK_IPC_RST 0xa +#define PXA1908_CLK_RTC 0xb +#define PXA1908_CLK_TWSI0 0xc +#define PXA1908_CLK_KPC 0xd +#define PXA1908_CLK_SWJTAG 0x11 +#define PXA1908_CLK_SSP2 0x14 +#define PXA1908_CLK_TWSI1 0x19 +#define PXA1908_CLK_THERMAL 0x1c +#define PXA1908_CLK_TWSI3 0x1d +#define PXA1908_APBC_NR_CLKS 0x30 + +/* apb (apbcp) peripherals */ +#define PXA1908_CLK_UART2 0x7 +#define PXA1908_CLK_TWSI2 0xa +#define PXA1908_CLK_AICER 0xe +#define PXA1908_APBCP_NR_CLKS 0xe + +/* axi (apmu) peripherals */ +#define PXA1908_CLK_CCIC1 0x9 +#define PXA1908_CLK_ISP 0xe +#define PXA1908_CLK_GATE_CTRL 0x10 +#define PXA1908_CLK_DSI1 0x11 +#define PXA1908_CLK_DISP1 0x13 +#define PXA1908_CLK_CCIC0 0x14 +#define PXA1908_CLK_SDH0 0x15 +#define PXA1908_CLK_SDH1 0x16 +#define PXA1908_CLK_SDH2 0x38 +#define PXA1908_CLK_USB 0x17 +#define PXA1908_CLK_NF 0x18 +#define PXA1908_CLK_CORE_DEBUG 0x24 +#define PXA1908_CLK_VPU 0x29 +#define PXA1908_CLK_GC 0x51 +#define PXA1908_CLK_GC2D 0x3d +#define PXA1908_CLK_TRACE 0x42 +#define PXA1908_CLK_DVC_DFC_DEBUG 0x50 +#define PXA1908_APMU_NR_CLKS 0x60 + +#endif From patchwork Fri Jul 21 20:37:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Duje_Mihanovi=C4=87?= X-Patchwork-Id: 124101 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp469647vqg; Fri, 21 Jul 2023 14:18:36 -0700 (PDT) X-Google-Smtp-Source: APBJJlEqGo0UOoSY/e2Fkuyf4Lv49ZoMX1VEOBXtkXtvvf1V6vac/wArXx8R9DvYPwb6u0ZeRnrz X-Received: by 2002:aa7:cb59:0:b0:521:d275:c5a0 with SMTP id w25-20020aa7cb59000000b00521d275c5a0mr2202520edt.15.1689974315859; Fri, 21 Jul 2023 14:18:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689974315; cv=none; d=google.com; s=arc-20160816; b=oSkviEs2bnQifhk1Rab61QniLAi4dEJggJ5bU/Yfqu6QXVyGlW7KgnDwhhXBd0Amdw SsOrBZTuDJ0jf/ZTUjsmChhLm1MPl87kGjvaptR2GqKd1PShJ2zVhb9GDaWkLPkzlA6z 7euGGEMqIAMbv63Du6eCPAlPGMf7S9y+a7HLFLOkvQ5GNNUU0BQZ3Ff53wA+NAKjmGj/ vFuHYLqmGnmh7lLyZff7Cx8shAzdgp7rZoqoqZ4inq1G0yY5UQRRgmDUC3z0XFn4ptVr ncoW2w0lwU8IpGk/DgrjQ5o1tanBKll2Sy0VliSaEdvJrRhHSwuY5TQ5RmxFLKsSRis4 HWUw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=YOmDgdqewvAiCra0YK3I2uONDJ8cLwebFMGOUuXS1M8=; fh=qsJZYvWLcuDiu2Ao8qI6ufYUSrHLFCX9/rjTHxKRHaA=; b=u60Dw56vD0Dv+9rqkpZVqOuvVKB0Bdt/NvMy8cZflBItMND8qpZm8b2o84boacflOh WEmkSGxXVk+/25rx+tkCIT2EL51bm03MbV/yu1VU2lFSByedOmPXMY+iRSMyAR2vgRSc VVJOXQTbtWqKjXk8ByVzCO4fVqQ9/0vfJfoqPYdxnHbYRI8PVmPMjIJLunuyV5FA5H4F IuTJvSg56MX88qA8Xssgvz/KuRI00isADJDg+hQghI4eUhEfUNENq+uMe4Qxk3AYfpyG fAy2Nr0BHhEChAHm+2vzzdqPuREjyXaPjhZgxFr6i+Ea1Wg/tf7X8dk+RWDeM4JIpHMR aUkQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c23-20020a056402121700b0051a59d81c45si2751351edw.18.2023.07.21.14.18.12; Fri, 21 Jul 2023 14:18:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231128AbjGUVME (ORCPT + 99 others); Fri, 21 Jul 2023 17:12:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229451AbjGUVMD (ORCPT ); Fri, 21 Jul 2023 17:12:03 -0400 X-Greylist: delayed 343 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 21 Jul 2023 14:11:57 PDT Received: from mx.skole.hr (mx1.hosting.skole.hr [161.53.165.185]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D08330E2; Fri, 21 Jul 2023 14:11:57 -0700 (PDT) Received: from mx1.hosting.skole.hr (localhost.localdomain [127.0.0.1]) by mx.skole.hr (mx.skole.hr) with ESMTP id C2ED386D1E; Fri, 21 Jul 2023 23:06:13 +0200 (CEST) From: =?utf-8?q?Duje_Mihanovi=C4=87?= To: =?unknown-8bit?q?Michael_Turquette_=3Cmturquette=40baylibre=2Ecom=3E=2C_?= =?unknown-8bit?q?Stephen_Boyd_=3Csboyd=40kernel=2Eorg=3E=2C_Rob_Herring_=3C?= =?unknown-8bit?q?robh+dt=40kernel=2Eorg=3E=2C_Krzysztof_Kozlowski_=3Ckrzysz?= =?unknown-8bit?q?tof=2Ekozlowski+dt=40linaro=2Eorg=3E=2C_Conor_Dooley_=3Cco?= =?unknown-8bit?q?nor+dt=40kernel=2Eorg=3E=2C_=87__=3Cduje=2Emihanovic=40sko?= =?unknown-8bit?q?le=2Ehr=3E=2C_linux-clk=40vger=2Ekernel=2Eorg=2C_devicetre?= =?unknown-8bit?q?e=40vger=2Ekernel=2Eorg=2C_linux-kernel=40vger=2Ekernel=2E?= =?unknown-8bit?q?org?= Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, afaerber@suse.com Subject: [PATCH 06/10] dt-bindings: clock: Add documentation for Marvell PXA1908 Date: Fri, 21 Jul 2023 22:37:48 +0200 Message-ID: <20230721210042.21535-7-duje.mihanovic@skole.hr> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230721210042.21535-1-duje.mihanovic@skole.hr> References: <20230721210042.21535-1-duje.mihanovic@skole.hr> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772066508019846050 X-GMAIL-MSGID: 1772066508019846050 Add dt bindings and documentation for Marvell PXA1908's clock controller blocks. Signed-off-by: Duje Mihanović --- .../bindings/clock/marvell,pxa1908.yaml | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/marvell,pxa1908.yaml diff --git a/Documentation/devicetree/bindings/clock/marvell,pxa1908.yaml b/Documentation/devicetree/bindings/clock/marvell,pxa1908.yaml new file mode 100644 index 000000000000..3fa6f00a26f7 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/marvell,pxa1908.yaml @@ -0,0 +1,53 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/marvell,pxa1908.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Marvell PXA1908 Clock Controllers + +maintainers: + - Duje Mihanović + +description: | + The PXA1908 clock subsystem generates and supplies clock to various + controllers within the PXA1908 SoC. The PXA1908 contains numerous clock + controller blocks, with the ones currently supported being APBC, APBCP, MPMU + and APMU roughly corresponding to internal buses. + + Each clock is assigned an identifier and client nodes use this identifier to + specify the clock which they consume. + + All these identifiers could be found in . + +properties: + compatible: + enum: + - marvell,pxa1908-apbc + - marvell,pxa1908-apbcp + - marvell,pxa1908-mpmu + - marvell,pxa1908-apmu + reg: + maxItems: 1 + description: | + Physical address of the clock controller and length of the memory mapped + region. + + '#clock-cells': + const: 1 + +required: + - compatible + - reg + - '#clock-cells' + +additionalProperties: false + +examples: + # APMU block: + - | + clock-controller@d4282800 { + compatible = "marvell,pxa1908-apmu"; + reg = <0xd4282800 0x400>; + #clock-cells = <1>; + }; From patchwork Fri Jul 21 20:37:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Duje_Mihanovi=C4=87?= X-Patchwork-Id: 124113 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp476753vqg; Fri, 21 Jul 2023 14:33:15 -0700 (PDT) X-Google-Smtp-Source: APBJJlFXja36eUEPDjx7Iebkq6GL9K+bqFPveub44iMUb+Dnn/6W2QZwna1Pb65N2M+HWiIoKzpH X-Received: by 2002:a05:6358:9909:b0:135:99fc:2647 with SMTP id w9-20020a056358990900b0013599fc2647mr958670rwa.30.1689975194888; Fri, 21 Jul 2023 14:33:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689975194; cv=none; d=google.com; s=arc-20160816; b=m+dsj4QCNH/GuMy2u+nO1nUstngEeFzhIjaUolBfXW9OJPOXzth6H9MSuOMQZ9wJjh O1zEtlMR4i/bsvzEAXJDX4iqnY6WLi6+J1W4s0XewkTNPlHc0w1qOogCYyZvUc+oXPm4 0xisJVR0U0FhUGcuFly5fqFVsD928lWavyhO+mTu3gq/E+NN6fPTasQtP4ZL55vMfWrz H5Yjb3GEwM6n8gI9h5slLecuPN/UKsyKYZjQqt2bDjBWhD1Sut+VSgaoN29jJlienZfp 7uZ7MobOEq7zBUUWHgjYM3LyVGlNGa5ycp8N1uaMFFNHnc528Y8N8+Iohi9Jbr9KAv1V Y2pA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Hwi9KYEVO+12VKF17t+ArpKbBYnX4fpXQec/m/cj+vU=; fh=3epPsusG9g+6zaccG/WQH48+sVDgRwE11BC+k/h18eY=; b=OR0tg3pB3NsmHNKmldtBonKCosLdQZieAcOyt4Gsal3FEtZhy5D8BDq97HFvgl6AES KCOg3+W7IYndOXY0tzH+xSqBSYPWm5oT9IHewmaKFqQ0OMTZ/QpI1gz/Lp69L9Shukk6 o0egK6dTGFCqhW1vzjoOJw81IZKmjLrU9yffz8SHsaGuP7TNaypexbT7g7xpQOaJ8qLt TTz6wGodF+f6Oiudoizr07hNHTM0RFV8109jnFqSns5CN4PK4i0BOqgKU9iVI4urmfZp HtgoHin5Pel65Qs8yBGm2YhKKuIz5dOybe5EQkBM5jBgki26G1p1BmpZHfprUy+K3V7K DGZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f24-20020a633818000000b0055acfb661casi3638137pga.894.2023.07.21.14.33.00; Fri, 21 Jul 2023 14:33:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230168AbjGUVNy (ORCPT + 99 others); Fri, 21 Jul 2023 17:13:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229844AbjGUVNp (ORCPT ); Fri, 21 Jul 2023 17:13:45 -0400 Received: from mx.skole.hr (mx2.hosting.skole.hr [161.53.165.186]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39B1F3A81; Fri, 21 Jul 2023 14:13:17 -0700 (PDT) Received: from mx2.hosting.skole.hr (localhost.localdomain [127.0.0.1]) by mx.skole.hr (mx.skole.hr) with ESMTP id D069C880C3; Fri, 21 Jul 2023 23:06:13 +0200 (CEST) From: =?utf-8?q?Duje_Mihanovi=C4=87?= To: Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, afaerber@suse.com, =?utf-8?q?Duje_Mihanovi=C4=87?= Subject: [PATCH 07/10] arm64: Kconfig.platforms: Add config for Marvell PXA1908 platform Date: Fri, 21 Jul 2023 22:37:49 +0200 Message-ID: <20230721210042.21535-8-duje.mihanovic@skole.hr> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230721210042.21535-1-duje.mihanovic@skole.hr> References: <20230721210042.21535-1-duje.mihanovic@skole.hr> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772067429681115973 X-GMAIL-MSGID: 1772067429681115973 Add ARCH_MMP configuration option for Marvell PXA1908 SoC. Signed-off-by: Duje Mihanović --- arch/arm64/Kconfig.platforms | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms index 6069120199bb..b417cae42c84 100644 --- a/arch/arm64/Kconfig.platforms +++ b/arch/arm64/Kconfig.platforms @@ -89,6 +89,17 @@ config ARCH_BERLIN help This enables support for Marvell Berlin SoC Family +config ARCH_MMP + bool "Marvell MMP SoC Family" + select ARM_GIC + select ARM_ARCH_TIMER + select ARM_SMMU + select MMP_PDMA + select PINCTRL_SINGLE + help + This enables support for Marvell MMP SoC family, currently + supporting PXA1908 aka IAP140. + config ARCH_BITMAIN bool "Bitmain SoC Platforms" help From patchwork Fri Jul 21 20:37:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Duje_Mihanovi=C4=87?= X-Patchwork-Id: 124112 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp476571vqg; Fri, 21 Jul 2023 14:32:45 -0700 (PDT) X-Google-Smtp-Source: APBJJlGjpnM9L/Ns/x08RxU7nVpHwuh3VNkQPMr262rJyi5Ybr0An6CLBDp6ooLvq/snumxzZpJo X-Received: by 2002:a17:902:e88e:b0:1b8:a6be:ead3 with SMTP id w14-20020a170902e88e00b001b8a6beead3mr2970277plg.57.1689975165060; Fri, 21 Jul 2023 14:32:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689975165; cv=none; d=google.com; s=arc-20160816; b=XV158IVvrtFgbKtxP/3UtmyfZvgaCYtXYMb23JZedwy72ZT+ZwYn9rneZrgsW3j3RF LrYib6J4dTczs7mBQalbXtHeCQVV03l4+qVX1jTm3UnRHSWtKe2C4ciD8mRtOAyhyrKc vPH3PcTQGfjAnPlziQ2ZMegMM1yxxAu+mIH/7skOBND67jtZthhF6Qi7YKdO0lh2pjRi Kbjd0alRh5ColpFoFgm2q2lFKsQFVr9QTv7Y2aoOWkVptMIBAVdYObFQoccEikriFFCf nVDZjiySLy2XaTfG8SlRnO1necTS/7/9k48aCqqqKaAbq79FR55Imnfq75sgmypSFJF9 nCNw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=wUWl3hsG6rLqNIJnsho8f02L66YGV7f2ecWVu7ISqmg=; fh=SjcZzfVF4r3wM/F2N/uL0kYl/rBIJojl6KHh9m6SFsc=; b=xsgxUeV/C7JRyCjMLAlG7lCJleTPhlZUsjgpzP/pR9c9Eh+iIGBelkVgRsh8suY9Gw ND2Jcfki3SyNeTaW6TPRdJkUi49ASA1T5f2l2hy2ACYkDTDylCIxFExrL49/9D3poBBW k8hxeyIovkqoR8TGfpNaYxsMX4ZjJWYvJwRFcD8Xv+YVsU/GR9tuhNJ/CoT8mElohlIu lZPOkRtavMnTGJ0YDAh0VaQGfoYnWSZEo7JpSltYDBKEMSyRIdlOlxfGsVKBeS5wW7eP MVYB66ArDFgp8hmvJoC9gKeW/cQkddsbh8dw0NhxePLSJdwiaoGc5Ihato8TEBOCSDGA V21Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t14-20020a1709027fce00b001b9d53d1e12si361852plb.242.2023.07.21.14.32.31; Fri, 21 Jul 2023 14:32:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230078AbjGUVMP (ORCPT + 99 others); Fri, 21 Jul 2023 17:12:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230252AbjGUVME (ORCPT ); Fri, 21 Jul 2023 17:12:04 -0400 X-Greylist: delayed 334 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 21 Jul 2023 14:11:57 PDT Received: from mx.skole.hr (mx1.hosting.skole.hr [161.53.165.185]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D504359F; Fri, 21 Jul 2023 14:11:57 -0700 (PDT) Received: from mx1.hosting.skole.hr (localhost.localdomain [127.0.0.1]) by mx.skole.hr (mx.skole.hr) with ESMTP id 9401986D1F; Fri, 21 Jul 2023 23:06:15 +0200 (CEST) From: =?utf-8?q?Duje_Mihanovi=C4=87?= To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , =?utf-8?q?Duje_Mihanovi=C4=87?= , Kees Cook , Tony Luck , "Guilherme G. Piccoli" , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-hardening@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, afaerber@suse.com Subject: [PATCH 08/10] arm64: dts: Add DTS for Marvell PXA1908 and samsung,coreprimevelte Date: Fri, 21 Jul 2023 22:37:50 +0200 Message-ID: <20230721210042.21535-9-duje.mihanovic@skole.hr> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230721210042.21535-1-duje.mihanovic@skole.hr> References: <20230721210042.21535-1-duje.mihanovic@skole.hr> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772067398740388512 X-GMAIL-MSGID: 1772067398740388512 Add DTS for Marvell PXA1908 SoC and Samsung Galaxy Core Prime Value Edition LTE, a smartphone based on said SoC. Signed-off-by: Duje Mihanović --- arch/arm64/boot/dts/marvell/Makefile | 1 + .../pxa1908-samsung-coreprimevelte.dts | 321 ++++++++++++++++++ arch/arm64/boot/dts/marvell/pxa1908.dtsi | 298 ++++++++++++++++ 3 files changed, 620 insertions(+) create mode 100644 arch/arm64/boot/dts/marvell/pxa1908-samsung-coreprimevelte.dts create mode 100644 arch/arm64/boot/dts/marvell/pxa1908.dtsi diff --git a/arch/arm64/boot/dts/marvell/Makefile b/arch/arm64/boot/dts/marvell/Makefile index 79ac09b58a89..0e277a0d368b 100644 --- a/arch/arm64/boot/dts/marvell/Makefile +++ b/arch/arm64/boot/dts/marvell/Makefile @@ -27,3 +27,4 @@ dtb-$(CONFIG_ARCH_MVEBU) += cn9132-db-B.dtb dtb-$(CONFIG_ARCH_MVEBU) += cn9130-crb-A.dtb dtb-$(CONFIG_ARCH_MVEBU) += cn9130-crb-B.dtb dtb-$(CONFIG_ARCH_MVEBU) += ac5-98dx35xx-rd.dtb +dtb-$(CONFIG_ARCH_MMP) += pxa1908-samsung-coreprimevelte.dtb diff --git a/arch/arm64/boot/dts/marvell/pxa1908-samsung-coreprimevelte.dts b/arch/arm64/boot/dts/marvell/pxa1908-samsung-coreprimevelte.dts new file mode 100644 index 000000000000..3e10a77a106e --- /dev/null +++ b/arch/arm64/boot/dts/marvell/pxa1908-samsung-coreprimevelte.dts @@ -0,0 +1,321 @@ +// SPDX-License-Identifier: GPL-2.0-only +#include "pxa1908.dtsi" +#include +#include + +/ { + pxa,rev-id = <3928 2>; + model = "Samsung Galaxy Core Prime VE LTE"; + compatible = "samsung,coreprimevelte", "marvell,pxa1908"; + + /* Bootloader fills this in */ + memory { + device_type = "memory"; + reg = <0 0 0 0>; + }; + + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + framebuffer@17000000 { + reg = <0 0x17000000 0 0x1800000>; + no-map; + }; + + gpu@9000000 { + reg = <0 0x9000000 0 0x1000000>; + }; + + /* Communications processor, aka modem */ + cp@3000000 { + reg = <0 0x3000000 0 0x5000000>; + }; + + cm3@a000000 { + reg = <0 0xa000000 0 0x80000>; + }; + + seclog@8000000 { + reg = <0 0x8000000 0 0x100000>; + }; + + ramoops@8100000 { + compatible = "ramoops"; + reg = <0 0x8100000 0 0x40000>; + record-size = <0x8000>; + console-size = <0x20000>; + max-reason = <5>; + }; + }; + + fb0: framebuffer@17177000 { + compatible = "simple-framebuffer"; + reg = <0 0x17177000 0 (480 * 800 * 4)>; + width = <480>; + height = <800>; + stride = <(480 * 4)>; + format = "a8r8g8b8"; + }; + + muic-i2c { + compatible = "i2c-gpio"; + sda-gpios = <&gpio 30 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; + scl-gpios = <&gpio 29 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; + i2c-gpio,delay-us = <3>; + i2c-gpio,timeout-ms = <100>; + #address-cells = <1>; + #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&muic_i2c_pins>; + + muic: extcon@14 { + compatible = "siliconmitus,sm5504-muic"; + reg = <0x14>; + interrupt-parent = <&gpio>; + interrupts = <0 IRQ_TYPE_EDGE_FALLING>; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&gpio_keys_pins>; + autorepeat; + + key-home { + label = "Home"; + linux,code = ; + gpios = <&gpio 50 GPIO_ACTIVE_LOW>; + }; + + key-volup { + label = "Volume Up"; + linux,code = ; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + }; + + key-voldown { + label = "Volume Down"; + linux,code = ; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + }; + }; + + chosen {}; +}; + +&smmu { + status = "okay"; +}; + +&pmx { + pinctrl-single,gpio-range = <&range 55 55 0>, + <&range 110 32 0>, + <&range 52 1 0>; + + pinctrl-names = "default"; + pinctrl-0 = <&board_pins_1 &board_pins_2 &board_pins_3>; + + board_pins_1: pinmux_board_1 { + pinctrl-single,pins = < + 0x160 0 + 0x164 0 + 0x168 0 + 0x16c 0 + >; + pinctrl-single,drive-strength = <0x1000 0x1800>; + pinctrl-single,bias-pullup = <0x8000 0x8000 0 0xc000>; + pinctrl-single,bias-pulldown = <0x8000 0x8000 0 0xa000>; + pinctrl-single,input-schmitt = <0 0x30>; + pinctrl-single,input-schmitt-enable = <0x40 0 0x40 0x40>; + pinctrl-single,low-power-mode = <0x288 0x388>; + }; + + board_pins_2: pinmux_board_2 { + pinctrl-single,pins = < + 0x44 1 + 0x48 1 + 0x20 1 + 0x18 1 + 0x14 1 + 0x10 1 + 0xc 1 + 0x8 1 + 0x68 1 + 0x58 0 + 0x54 0 + 0x7c 0 + 0x6c 0 + 0x70 0 + 0x4c 1 + 0x50 1 + 0xac 0 + 0x90 0 + 0x8c 0 + 0x88 0 + 0x84 0 + 0xc8 0 + 0x128 0 + 0x190 0 + 0x194 0 + 0x1a0 0 + 0x114 0 + 0x118 0 + 0x1d8 0 + 0x1e4 0 + 0xe8 0 + 0x100 0 + 0x204 0 + 0x210 0 + 0x218 0 + >; + pinctrl-single,bias-pullup = <0xc000 0xc000 0 0xc000>; + pinctrl-single,bias-pulldown = <0x8000 0xa000 0x8000 0xc000>; + pinctrl-single,low-power-mode = <0x288 0x388>; + }; + + board_pins_3: pinmux_board_3 { + pinctrl-single,pins = < + 0x260 0 + 0x264 0 + 0x268 0 + 0x26c 0 + 0x270 0 + 0x274 0 + 0x78 0 + 0x74 0 + 0xb0 1 + >; + pinctrl-single,drive-strength = <0x1000 0x1800>; + pinctrl-single,bias-pullup = <0 0xc000 0 0xc000>; + pinctrl-single,bias-pulldown = <0 0xa000 0 0xa000>; + pinctrl-single,input-schmitt = <0 0x30>; + pinctrl-single,input-schmitt-enable = <0x40 0 0x40 0x40>; + pinctrl-single,low-power-mode = <0 0x388>; + }; + + uart0_pins: pinmux_uart0 { + pinctrl-single,pins = < + 0x198 6 + 0x19c 6 + >; + pinctrl-single,drive-strength = <0x1000 0x1800>; + pinctrl-single,bias-pullup = <0 0xc000 0 0xc000>; + pinctrl-single,bias-pulldown = <0 0xa000 0 0xa000>; + pinctrl-single,input-schmitt = <0 0x30>; + pinctrl-single,input-schmitt-enable = <0x40 0 0x40 0x40>; + pinctrl-single,low-power-mode = <0 0x388>; + }; + + gpio_keys_pins: pinmux_gpio_keys { + pinctrl-single,pins = < + 0x11c 0 + 0x120 0 + 0x1a4 0 + >; + pinctrl-single,drive-strength = <0x1000 0x1800>; + pinctrl-single,bias-pullup = <0xc000 0xc000 0 0xc000>; + pinctrl-single,bias-pulldown = <0x8000 0xa0000 0x8000 0xa000>; + pinctrl-single,input-schmitt = <0 0x30>; + pinctrl-single,input-schmitt-enable = <0x40 0 0x40 0x40>; + pinctrl-single,low-power-mode = <0 0x388>; + }; + + muic_i2c_pins: pinmux_muic_i2c { + pinctrl-single,pins = < + 0x154 0 + 0x150 0 + >; + pinctrl-single,drive-strength = <0x1000 0x1800>; + pinctrl-single,bias-pullup = <0 0xc000 0 0xc000>; + pinctrl-single,bias-pulldown = <0 0xa000 0 0xa000>; + pinctrl-single,input-schmitt = <0 0x30>; + pinctrl-single,input-schmitt-enable = <0x40 0 0x40 0x40>; + pinctrl-single,low-power-mode = <0x288 0x388>; + }; + + sdh0_pins_1: pinmux_sdh0_1 { + pinctrl-single,pins = < + 0x108 0 + >; + pinctrl-single,drive-strength = <0x1000 0x1800>; + pinctrl-single,bias-pullup = <0xc000 0xc000 0 0xc000>; + pinctrl-single,bias-pulldown = <0x8000 0xa000 0x8000 0xa000>; + pinctrl-single,input-schmitt = <0 0x30>; + pinctrl-single,input-schmitt-enable = <0x40 0 0x40 0x40>; + pinctrl-single,low-power-mode = <0 0x388>; + }; + + sdh0_pins_2: pinmux_sdh0_2 { + pinctrl-single,pins = < + 0x94 0 + 0x98 0 + 0x9c 0 + 0xa0 0 + 0xa4 0 + >; + pinctrl-single,drive-strength = <0x800 0x1800>; + pinctrl-single,bias-pullup = <0xc000 0xc000 0 0xc000>; + pinctrl-single,bias-pulldown = <0x8000 0xa000 0x8000 0xa000>; + pinctrl-single,input-schmitt = <0 0x30>; + pinctrl-single,input-schmitt-enable = <0x40 0 0x40 0x40>; + pinctrl-single,low-power-mode = <0 0x388>; + }; + + sdh0_pins_3: pinmux_sdh0_3 { + pinctrl-single,pins = < + 0xa8 0 + >; + pinctrl-single,drive-strength = <0x1000 0x1800>; + pinctrl-single,bias-pullup = <0 0xc000 0 0xc000>; + pinctrl-single,bias-pulldown = <0 0xa000 0 0xa000>; + pinctrl-single,input-schmitt = <0 0x30>; + pinctrl-single,input-schmitt-enable = <0x40 0 0x40 0x40>; + pinctrl-single,low-power-mode = <0x208 0x388>; + }; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins>; +}; + +&twsi0 { + status = "okay"; +}; + +&twsi1 { + status = "okay"; +}; + +&twsi2 { + status = "okay"; +}; + +&twsi3 { + status = "okay"; +}; + +&usb { + extcon = <&muic>, <&muic>; +}; + +&sdh2 { + /* Disabled for now because initialization fails with -ETIMEDOUT. */ + status = "disabled"; + bus-width = <8>; + non-removable; + broken-cd; + mmc-ddr-1_8v; +}; + +&sdh0 { + pinctrl-names = "default"; + pinctrl-0 = <&sdh0_pins_1 &sdh0_pins_2 &sdh0_pins_3>; + cd-gpios = <&gpio 11 0>; + cd-inverted; + bus-width = <4>; + wp-inverted; +}; diff --git a/arch/arm64/boot/dts/marvell/pxa1908.dtsi b/arch/arm64/boot/dts/marvell/pxa1908.dtsi new file mode 100644 index 000000000000..7131b2070b72 --- /dev/null +++ b/arch/arm64/boot/dts/marvell/pxa1908.dtsi @@ -0,0 +1,298 @@ +// SPDX-License-Identifier: GPL-2.0-only +/dts-v1/; + +#include +#include + +/ { + model = "Marvell Armada PXA1908"; + compatible = "marvell,pxa1908"; + #address-cells = <2>; + #size-cells = <2>; + interrupt-parent = <&gic>; + + cpus { + #address-cells = <2>; + #size-cells = <0>; + + cpu@0 { + device_type = "cpu"; + compatible = "arm,cortex-a53", "arm,armv8"; + reg = <0 0>; + enable-method = "psci"; + }; + + cpu@1 { + device_type = "cpu"; + compatible = "arm,cortex-a53", "arm,armv8"; + reg = <0 1>; + enable-method = "psci"; + }; + + cpu@2 { + device_type = "cpu"; + compatible = "arm,cortex-a53", "arm,armv8"; + reg = <0 2>; + enable-method = "psci"; + }; + + cpu@3 { + device_type = "cpu"; + compatible = "arm,cortex-a53", "arm,armv8"; + reg = <0 3>; + enable-method = "psci"; + }; + }; + + psci { + compatible = "arm,psci-0.2"; + method = "smc"; + }; + + timer { + compatible = "arm,armv8-timer"; + interrupts = , + , + , + ; + }; + + soc { + compatible = "simple-bus"; + #address-cells = <2>; + #size-cells = <2>; + ranges; + + smmu: iommu@c0010000 { + compatible = "arm,mmu-400"; + reg = <0 0xc0010000 0 0x10000>; + #global-interrupts = <1>; + #iommu-cells = <1>; + interrupts = , + ; + status = "disabled"; + }; + + gic: interrupt-controller@d1df9000 { + compatible = "arm,gic-400"; + reg = <0 0xd1df9000 0 0x1000>, + <0 0xd1dfa000 0 0x2000>; + interrupts = ; + interrupt-controller; + #interrupt-cells = <3>; + }; + + apb@d4000000 { + compatible = "simple-bus"; + reg = <0 0xd4000000 0 0x200000>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0 0xd4000000 0x200000>; + + pdma: dma-controller@0 { + compatible = "marvell,pdma-1.0"; + reg = <0 0x10000>; + interrupts = ; + dma-channels = <30>; + #dma-cells = <2>; + }; + + twsi1: i2c@10800 { + compatible = "mrvl,mmp-twsi"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x10800 0x64>; + interrupts = ; + clocks = <&apbc PXA1908_CLK_TWSI1>; + mrvl,i2c-fast-mode; + status = "disabled"; + }; + + twsi0: i2c@11000 { + compatible = "mrvl,mmp-twsi"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x11000 0x64>; + interrupts = ; + clocks = <&apbc PXA1908_CLK_TWSI0>; + mrvl,i2c-fast-mode; + status = "disabled"; + }; + + twsi3: i2c@13800 { + compatible = "mrvl,mmp-twsi"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x13800 0x64>; + interrupts = ; + clocks = <&apbc PXA1908_CLK_TWSI3>; + mrvl,i2c-fast-mode; + status = "disabled"; + }; + + apbc: clock-controller@15000 { + compatible = "marvell,pxa1908-apbc"; + reg = <0x15000 0x1000>; + #clock-cells = <1>; + }; + + uart0: serial@17000 { + compatible = "mrvl,mmp-uart"; + reg = <0x17000 0x1000>; + interrupts = ; + dmas = <&pdma 21 1>, + <&pdma 22 1>; + dma-names = "rx", "tx"; + clocks = <&apbc PXA1908_CLK_UART0>; + }; + + uart1: serial@18000 { + compatible = "mrvl,mmp-uart"; + reg = <0x18000 0x1000>; + interrupts = ; + dmas = <&pdma 23 1>, + <&pdma 24 1>; + dma-names = "rx", "tx"; + clocks = <&apbc PXA1908_CLK_UART1>; + }; + + gpio: gpio@19000 { + compatible = "marvell,mmp-gpio"; + reg = <0x19000 0x800>; + #address-cells = <1>; + #size-cells = <1>; + gpio-controller; + #gpio-cells = <2>; + clocks = <&apbc PXA1908_CLK_GPIO>; + interrupts = ; + interrupt-names = "gpio_mux"; + interrupt-controller; + #interrupt-cells = <2>; + ranges = <0 0x19000 0x800>; + + gpio@0 { + reg = <0x0 0x4>; + }; + + gpio@4 { + reg = <0x4 0x4>; + }; + + gpio@8 { + reg = <0x8 0x4>; + }; + + gpio@100 { + reg = <0x100 0x4>; + }; + }; + + pmx: pinmux@1e000 { + compatible = "pinconf-single"; + reg = <0x1e000 0x330>; + #address-cells = <1>; + #size-cells = <1>; + #gpio-range-cells = <3>; + ranges; + + #pinctrl-cells = <1>; + pinctrl-single,register-width = <32>; + pinctrl-single,function-mask = <7>; + + range: gpio-range { + #pinctrl-single,gpio-range-cells = <3>; + }; + }; + + uart2: serial@36000 { + compatible = "mrvl,mmp-uart"; + reg = <0x36000 0x1000>; + interrupts = ; + dmas = <&pdma 4 1>, + <&pdma 5 1>; + dma-names = "rx", "tx"; + clocks = <&apbcp PXA1908_CLK_UART2>; + }; + + twsi2: i2c@37000 { + compatible = "mrvl,mmp-twsi"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x37000 0x64>; + interrupts = ; + clocks = <&apbcp PXA1908_CLK_TWSI2>; + mrvl,i2c-fast-mode; + status = "disabled"; + }; + + apbcp: clock-controller@3b000 { + compatible = "marvell,pxa1908-apbcp"; + reg = <0x3b000 0x1000>; + #clock-cells = <1>; + }; + + mpmu: clock-controller@50000 { + compatible = "marvell,pxa1908-mpmu"; + reg = <0x50000 0x1000>; + #clock-cells = <1>; + }; + }; + + axi@d4200000 { + compatible = "simple-bus"; + reg = <0 0xd4200000 0 0x200000>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0 0xd4200000 0x200000>; + + usbphy: phy@7000 { + compatible = "marvell,pxa1928-usb-phy"; + reg = <0x7000 0x200>; + clocks = <&apmu PXA1908_CLK_USB>; + #phy-cells = <0>; + }; + + usb: usb@8000 { + compatible = "chipidea,usb2"; + reg = <0x8000 0x200>; + interrupts = ; + clocks = <&apmu PXA1908_CLK_USB>; + phys = <&usbphy>; + phy-names = "usb-phy"; + }; + + sdh0: mmc@80000 { + compatible = "mrvl,pxav3-mmc"; + reg = <0x80000 0x120>; + interrupts = ; + clocks = <&apmu PXA1908_CLK_SDH0>; + clock-names = "io"; + mrvl,clk-delay-cycles = <31>; + }; + + sdh1: mmc@80800 { + compatible = "mrvl,pxav3-mmc"; + reg = <0x80800 0x120>; + interrupts = ; + clocks = <&apmu PXA1908_CLK_SDH1>; + clock-names = "io"; + mrvl,clk-delay-cycles = <31>; + }; + + sdh2: mmc@81000 { + compatible = "mrvl,pxav3-mmc"; + reg = <0x81000 0x120>; + interrupts = ; + clocks = <&apmu PXA1908_CLK_SDH2>; + clock-names = "io"; + mrvl,clk-delay-cycles = <31>; + }; + + apmu: clock-controller@82800 { + compatible = "marvell,pxa1908-apmu"; + reg = <0x82800 0x400>; + #clock-cells = <1>; + }; + }; + }; +}; From patchwork Fri Jul 21 20:37:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Duje_Mihanovi=C4=87?= X-Patchwork-Id: 124116 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp477000vqg; Fri, 21 Jul 2023 14:33:51 -0700 (PDT) X-Google-Smtp-Source: APBJJlH+/ZpXFjd4RgrXPTYKJ2pOkPPjc/f3zNoe+pJsxTkrzliuXaZPNIfuhKKgg0PV9xefUvcM X-Received: by 2002:a05:6358:8810:b0:134:c815:f067 with SMTP id hv16-20020a056358881000b00134c815f067mr1222610rwb.11.1689975231062; Fri, 21 Jul 2023 14:33:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689975231; cv=none; d=google.com; s=arc-20160816; b=LdHS3KTz2KDLiUnBG5XPlJXJnq+k413nqz6L2dz48JQL8mrUHp1BCL2QvJ0DUBBj/g OmPwVDB/QttkPeuovwNiBw6hOWOm64xLXmNxtEOAoQoInYRPSCPJrYpMWOltu9ZC0ylY C6G2HpesSu47bFPPL8lYzVi9oU7hLoTVmHXJpG7VQJlBIn4f+nYF6bDlo01GZCFHjGyj q78CVDRYi8bXYdcnvfaGrg/4R5AUJuAeA9mmFIRFDlxeFxcvM+/vSrxiJbUJXLHiNfZ9 pDtDD7ZuiTl+4yDiygbFMAQbVtxmf2cMZ5i+tvZesyvAysrAVh2VhmC0pgcrb5yfbZgW xSHQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=SxqdqmbcB6ZuFF2eshArIj60+/NtLs8FH95Cz0ss3Kg=; fh=PKP8S/t86sDZ2ti9vIE64iIKfoOM3PzkSZutfwMJltM=; b=PBA+w6wp288ABmPhGkHP4uk+V2MYfDmMGA8fpXfBWPrtcgqYXfCmTVs9dyeUtA6qCC nuTpHe4i4JlOl3NneBRvWAxkssIMhuTABDd7JLpZqnsoP07XU8vdtalva8v3ONCu8jwI 3Xg0tb661hzSgPYF0klmYjUq1/MwauUHmSwJ4jMir+2GV0ysI7445bDtgl4llmXxs/J4 ItBKe/g/1z7M5Q0xrye80RQk3mmNijT1PRETicEWSXQTeNcNZZICtU+Ka0qvNWVKSBp8 ERIDr3f+n0lTB6oARDGt+POo/QeLlILqOCW4j7yDFPMjvvlN6tXn4Sg2X3rR/XevsNt7 axKQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v24-20020a63f218000000b005578994f212si3710467pgh.425.2023.07.21.14.33.38; Fri, 21 Jul 2023 14:33:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231136AbjGUVNw (ORCPT + 99 others); Fri, 21 Jul 2023 17:13:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229689AbjGUVNp (ORCPT ); Fri, 21 Jul 2023 17:13:45 -0400 Received: from mx.skole.hr (mx2.hosting.skole.hr [161.53.165.186]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F5B83A80; Fri, 21 Jul 2023 14:13:16 -0700 (PDT) Received: from mx2.hosting.skole.hr (localhost.localdomain [127.0.0.1]) by mx.skole.hr (mx.skole.hr) with ESMTP id A0D21880C6; Fri, 21 Jul 2023 23:06:15 +0200 (CEST) From: =?utf-8?q?Duje_Mihanovi=C4=87?= To: =?utf-8?q?Duje_Mihanovi=C4=87?= , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, afaerber@suse.com Subject: [PATCH 09/10] dt-bindings: marvell: Document PXA1908 SoC Date: Fri, 21 Jul 2023 22:37:51 +0200 Message-ID: <20230721210042.21535-10-duje.mihanovic@skole.hr> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230721210042.21535-1-duje.mihanovic@skole.hr> References: <20230721210042.21535-1-duje.mihanovic@skole.hr> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772067468289223513 X-GMAIL-MSGID: 1772067468289223513 Add dt bindings and documentation for Marvell PXA1908 SoC. Signed-off-by: Duje Mihanović --- .../bindings/arm/marvell/marvell,pxa1908.yaml | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/marvell/marvell,pxa1908.yaml diff --git a/Documentation/devicetree/bindings/arm/marvell/marvell,pxa1908.yaml b/Documentation/devicetree/bindings/arm/marvell/marvell,pxa1908.yaml new file mode 100644 index 000000000000..085d238129ad --- /dev/null +++ b/Documentation/devicetree/bindings/arm/marvell/marvell,pxa1908.yaml @@ -0,0 +1,33 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/arm/marvell/pxa1908.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Marvell PXA1908 Platforms + +maintainers: + - Duje Mihanović + +properties: + $nodename: + const: '/' + compatible: + oneOf: + - items: + - enum: + - samsung,coreprimevelte + - const: marvell,pxa1908 + + pxa,rev-id: + $ref: /schemas/types.yaml#/definitions/uint32-array + oneOf: + - items: + - description: Board ID + - description: Board revision + description: | + Some bootloaders use this property to determine whether the provided dt + blob is compatible with a specific device. For example, Samsung's S-Boot + is known to require this property. + +additionalProperties: false From patchwork Fri Jul 21 20:37:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Duje_Mihanovi=C4=87?= X-Patchwork-Id: 124104 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp469899vqg; Fri, 21 Jul 2023 14:19:18 -0700 (PDT) X-Google-Smtp-Source: APBJJlHvMMkNPluohS0G2GfHg0DwIvyrkC7dxdaj6EkPVQnAV5mA8FlzerBoT0BhJoCpsDvgVHT5 X-Received: by 2002:a17:906:2cd:b0:991:dc98:69ff with SMTP id 13-20020a17090602cd00b00991dc9869ffmr2711861ejk.67.1689974358074; Fri, 21 Jul 2023 14:19:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689974358; cv=none; d=google.com; s=arc-20160816; b=QZyoX5saHZZ9d0D/fQYWAB1hxB9eb1xylcEgF1wLDkoSnyeM4SelOX4P3uc8dKlFLh LL1lUe014hpAOJ5IVAN3arTfjZWOTpRPx/2lrfnb7QnujZYeyo0lrscgw6j/tE7eXpHS ah0nPX6J+8WKFFNHr8aqXSj6DzSQj5OnxDT1G0QouxaN1mHk/GeAD2JBgyTt2iPPTcVi m058ZWQuD+95RwXizaAzqcRrJFsGUoO9p1WYBMGBHvIV8ABX+AIIWt1DICrKoGLYe+Lz GbReI8tCOBEYZPIg75CrIZAkuMXyJD2v48RMGcj2a2lIoQKa0MOtPYrwzuy2aIHcI/hg CgWA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Uw54wConHOXa9bkiBZc4HVz1KeRPe+u26m0IFDxpN88=; fh=oaFJKbrQ+ucsxB9juJy+cfgWb3HSPoyV2UREWFc1oIk=; b=vH9pFx5l1jG3qOKwcRn+HzZFNxItgqIiSMMUCsvc5YMSZnZwA2ftEXe1a/E6ZdzZFu 4NNck5nJoz0w3o6b4kmxwgopqCr5vGTFcihMlpYruHmHtIibUF1ufRbML9+KE8DNMQ1C hVUaNb4fKkBz1oMG5Wr9aXtwy1TeDtrxJHcY+RmCQ1iAnSLAoUILbU1VGUPP0zA9G8Ly w6+JUHfTFYy+GksSeAcHeHO+B9PhgokwJQjURXU3r0zoa1lwKh4P5Wcxem8s/QE4KZKF Zm1Lz0iBjz2cyrcsjONwI+S4NzjPBxTlri+DWbI6+8PNZ0qgCblRtJftkoxLBQNVUgNR /Xhg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d2-20020a170906370200b0098e3890e257si2563156ejc.131.2023.07.21.14.18.52; Fri, 21 Jul 2023 14:19:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231247AbjGUVMS (ORCPT + 99 others); Fri, 21 Jul 2023 17:12:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231142AbjGUVMF (ORCPT ); Fri, 21 Jul 2023 17:12:05 -0400 Received: from mx.skole.hr (mx1.hosting.skole.hr [161.53.165.185]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB148359C; Fri, 21 Jul 2023 14:12:03 -0700 (PDT) Received: from mx1.hosting.skole.hr (localhost.localdomain [127.0.0.1]) by mx.skole.hr (mx.skole.hr) with ESMTP id D413086D15; Fri, 21 Jul 2023 23:06:15 +0200 (CEST) From: =?utf-8?q?Duje_Mihanovi=C4=87?= To: linux-kernel@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, afaerber@suse.com, =?utf-8?q?Duje_Mihanovi=C4=87?= Subject: [PATCH 10/10] MAINTAINERS: add myself as Marvell PXA1908 maintainer Date: Fri, 21 Jul 2023 22:37:52 +0200 Message-ID: <20230721210042.21535-11-duje.mihanovic@skole.hr> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230721210042.21535-1-duje.mihanovic@skole.hr> References: <20230721210042.21535-1-duje.mihanovic@skole.hr> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772066552583643431 X-GMAIL-MSGID: 1772066552583643431 Add myself as the maintainer for Marvell PXA1908 SoC support. Signed-off-by: Duje Mihanović --- MAINTAINERS | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index aee340630eca..263fd6db0f7b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2297,6 +2297,16 @@ F: drivers/irqchip/irq-mvebu-* F: drivers/pinctrl/mvebu/ F: drivers/rtc/rtc-armada38x.c +ARM/Marvell PXA1908 SOC support +M: Duje Mihanović +L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) +S: Maintained +T: git https://gitlab.com/LegoLivesMatter/linux +F: Documentation/devicetree/bindings/arm/marvell/marvell,pxa1908.yaml +F: arch/arm64/boot/dts/marvell/pxa1908* +F: drivers/clk/mmp/clk-of-pxa1908.c +F: include/dt-bindings/clock/marvell,pxa1908.h + ARM/Mediatek RTC DRIVER M: Eddie Huang M: Sean Wang