Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp4017929rdh; Fri, 29 Sep 2023 08:52:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGbgwGY9BhJVhwiTmQIOLCbyF6bVoWiW58K/aUkBtKwaoJYCaY7NaL4jTQppHuoeIXLyts8 X-Received: by 2002:a05:6808:98e:b0:3ae:2024:8389 with SMTP id a14-20020a056808098e00b003ae20248389mr4654569oic.36.1696002744947; Fri, 29 Sep 2023 08:52:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696002744; cv=none; d=google.com; s=arc-20160816; b=YpU7XFJx2VKQWzcwKY/XtZpZ32+uvsVdob3LItxUEQiLWPnNbQ/77B9xiLjZWm9kMD wk8mhVz18htvEDkgXcUPOmu3GFS045OtxMm4m/M/m+yEUlrEbpv7BN/vkZzcKLlfEw7F N2bOmveYZL00p2EVMnuU5aA8nYc6Y+aOtNgw77t2J8MuDgc2PRIcrVYMV1xmK+Tx2Hpl S0IIiGBNPN8vFGBx7Dkf1jFLNnVAzq2z9Y4eIWffYszzYprlygIUd1LRqjZEErt4DiWu igWW+pP+qf3INS3BfzK49UJOCXZKLpqrPthumBr5twO3iJfZ415BxlCKv12hsjbxAtYc UfBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:from; bh=5wytED41wdUUxvC7NMb9dhfOJqcMIXXFpdMLPjrJQWc=; fh=SkKXeF1ItfOBCCeYz6SZULN93ioUp0mBo8b1/EUIaVM=; b=rHrvOdxAT4doNFQGYRSV/KLm2bq1nVm5Ip+BD6Zq41LoZCHklPkrgF/yw1609Xe8Wg 9v27Tf9Wu63ZM9VVfAt7xPUMmYs3aPq02kTByXxDVpG2Es8iicLuHiZWIW6GeMjcAzHb DxMxuWZnoqErcIp0F+nXpmtF6l44Wp7yTck2UHZZyW3GTAtRICaxQbprTraTwOVH5pqS Dh2iuNJKQXvcUaipmQXPbIUEHNHTL0uaNs0KfZxjNdl/FtRlDDRSAhQVhmUQQ3aZsv6j RTbWfLydQvM8DlMZARFRzeGkSDqIbR6y2EItXiz8H+Edf6b/K4GjES/BvMwaj7k6MlJc M7Fw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id x23-20020a631717000000b00570a4303746si20962967pgl.560.2023.09.29.08.52.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 08:52:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id C4628833816D; Fri, 29 Sep 2023 08:43:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233685AbjI2Pm4 (ORCPT + 99 others); Fri, 29 Sep 2023 11:42:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233152AbjI2Pmx (ORCPT ); Fri, 29 Sep 2023 11:42:53 -0400 Received: from mx.skole.hr (mx2.hosting.skole.hr [161.53.165.186]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10CDEB4; Fri, 29 Sep 2023 08:42:48 -0700 (PDT) Received: from mx2.hosting.skole.hr (localhost.localdomain [127.0.0.1]) by mx.skole.hr (mx.skole.hr) with ESMTP id 946BD83154; Fri, 29 Sep 2023 17:42:46 +0200 (CEST) From: =?utf-8?q?Duje_Mihanovi=C4=87?= Subject: [PATCH RESEND v5 0/8] Initial Marvell PXA1908 support Date: Fri, 29 Sep 2023 17:41:56 +0200 Message-Id: <20230929-pxa1908-lkml-v5-0-5aa5a1109c5f@skole.hr> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: Robert Jarzmik , Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lubomir Rintel , Catalin Marinas , Will Deacon , Kees Cook , Tony Luck , "Guilherme G. Piccoli" , =?utf-8?q?Duje_Mihanovi=C4=87?= Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-hardening@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, afaerber@suse.de, balejk@matfyz.cz, Andy Shevchenko , Krzysztof Kozlowski X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=5852; i=duje.mihanovic@skole.hr; h=from:subject:message-id; bh=Xu1zs3EzUBhG6q84vWkQxTbcKcOZ8g6ssZvbjQ+ejUA=; b=owEBbQKS/ZANAwAIAZoRnrBCLZbhAcsmYgBlFvByxcaleoHfAeq9PwtO+Ygyscd8U2nYa3m3q NKep5tveSqJAjMEAAEIAB0WIQRT351NnD/hEPs2LXiaEZ6wQi2W4QUCZRbwcgAKCRCaEZ6wQi2W 4bTsEACoL3Twg7pVqOr6Bp5HlkWlwwBBEMIM5yfLZlxXppTJjfHJQNzY05/XgdrBYKn/qycAsrK 1nFXPEk/E/vOM1VXKiRLgEWSsWy9Bf6u+RouhSeKCwMJBUUro3N9blqyNHXl/7Prf6HAeFSVMvm 2Kwog/4834UVwidkUHjT0+phkfh+YWbhHneRN7ZfALby8zr7GevSYNFdwDG7Q1bRQIWym/mRT47 4CGdwjHMQLUjWeX188TBGIgE8T5Cj5UXrHbx7kBIW9zhtk4n7Aq2ZRNvM9/wLAssHLoIPW06jkZ 0YkLiUy9MT4oxnvq3gDkKwtumWtdqw1V2ANHS3q5cr1tDNo/xjHcbb1Z8iGskUidUCErh0wKSnt 7aUzObh1oFDIvqX18n2m0OCHl8vB7ULCmwj31cYEfPVI19i6USLWglCEy36hh8ddqaLcdGdfxWH 5T7kOpKaE95xYqdWyYG/3psYqrqnxMZ0IIYtNnAwOmWa+aDNkYQfiB6RFvwAqrFWwqGmCz6DLtY rwxY6YlS0xqBvlkZbBuAYeJIrVjgKUhK1gvajgtV9FvA20hgRLreoyYwQoJ4rk9KzfMendwcPj8 1ty0snP+8Bybdl/NSYQwj5St+QEBi3RJ7Fn9Kn0auyOedLv5P4+4/K3DwIGb/fvAh6jLrGvxh9P hLlqAxW4K1FR5dQ== X-Developer-Key: i=duje.mihanovic@skole.hr; a=openpgp; fpr=53DF9D4D9C3FE110FB362D789A119EB0422D96E1 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 29 Sep 2023 08:43:01 -0700 (PDT) Hello, This series adds initial support for the Marvell PXA1908 SoC and "samsung,coreprimevelte", a smartphone using the SoC. USB works and the phone can boot a rootfs from an SD card, but there are some warnings in the dmesg: During SMP initialization: [ 0.006519] CPU features: SANITY CHECK: Unexpected variation in SYS_CNTFRQ_EL0. Boot CPU: 0x000000018cba80, CPU1: 0x00000000000000 [ 0.006542] CPU features: Unsupported CPU feature variation detected. [ 0.006589] CPU1: Booted secondary processor 0x0000000001 [0x410fd032] [ 0.010710] Detected VIPT I-cache on CPU2 [ 0.010716] CPU features: SANITY CHECK: Unexpected variation in SYS_CNTFRQ_EL0. Boot CPU: 0x000000018cba80, CPU2: 0x00000000000000 [ 0.010758] CPU2: Booted secondary processor 0x0000000002 [0x410fd032] [ 0.014849] Detected VIPT I-cache on CPU3 [ 0.014855] CPU features: SANITY CHECK: Unexpected variation in SYS_CNTFRQ_EL0. Boot CPU: 0x000000018cba80, CPU3: 0x00000000000000 [ 0.014895] CPU3: Booted secondary processor 0x0000000003 [0x410fd032] SMMU probing fails: [ 0.101798] arm-smmu c0010000.iommu: probing hardware configuration... [ 0.101809] arm-smmu c0010000.iommu: SMMUv1 with: [ 0.101816] arm-smmu c0010000.iommu: no translation support! On Samsung's PXA1908 phones, the bootloader does not start the ARM system timer, and my temporary solution (which isn't present in this series) was to put the code for starting the timer in the clock driver. Would this hack be accepted upstream in the form of a platform or clocksource driver such as drivers/clocksource/timer-mediatek-cpux.c? A 3.14 based Marvell tree is available on GitHub acorn-marvell/brillo_pxa_kernel, and a Samsung one on GitHub CoderCharmander/g361f-kernel. Andreas Färber attempted to upstream support for this SoC in 2017: https://lore.kernel.org/lkml/20170222022929.10540-1-afaerber@suse.de/ Signed-off-by: Duje Mihanović --- Changes in v5: - Address maintainer comments: - Move *_NR_CLKS to clock driver from dt binding file - Allocate correct number of clocks for each block instead of blindly allocating 50 for each - Link to v4: https://lore.kernel.org/r/20230807-pxa1908-lkml-v4-0-cb387d73b452@skole.hr Changes in v4: - Address maintainer comments: - Relicense clock binding file to BSD-2 - Add pinctrl-names to SD card node - Add vgic registers to GIC node - Rebase on v6.5-rc5 - Link to v3: https://lore.kernel.org/r/20230804-pxa1908-lkml-v3-0-8e48fca37099@skole.hr Changes in v3: - Address maintainer comments: - Drop GPIO dynamic allocation patch - Move clock register offsets into driver (instead of bindings file) - Add missing Tested-by trailer to u32_fract patch - Move SoC binding to arm/mrvl/mrvl.yaml - Add serial0 alias and stdout-path to board dts to enable UART debugging - Rebase on v6.5-rc4 - Link to v2: https://lore.kernel.org/r/20230727162909.6031-1-duje.mihanovic@skole.hr Changes in v2: - Remove earlycon patch as it's been merged into tty-next - Address maintainer comments: - Clarify GPIO regressions on older PXA platforms - Add Fixes tag to commit disabling GPIO pinctrl calls for this SoC - Add missing includes to clock driver - Clock driver uses HZ_PER_MHZ, u32_fract and GENMASK - Dual license clock bindings - Change clock IDs to decimal - Fix underscores in dt node names - Move chosen node to top of board dts - Clean up documentation - Reorder commits - Drop pxa,rev-id - Rename muic-i2c to i2c-muic - Reword some commits - Move framebuffer node to chosen - Add aliases for mmc nodes - Rebase on v6.5-rc3 - Link to v1: https://lore.kernel.org/r/20230721210042.21535-1-duje.mihanovic@skole.hr --- Andy Shevchenko (1): clk: mmp: Switch to use struct u32_fract instead of custom one Duje Mihanović (7): gpio: pxa: disable pinctrl calls for MMP_GPIO dt-bindings: clock: Add Marvell PXA1908 clock bindings clk: mmp: Add Marvell PXA1908 clock driver dt-bindings: marvell: Document PXA1908 SoC arm64: Kconfig.platforms: Add config for Marvell PXA1908 platform arm64: dts: Add DTS for Marvell PXA1908 and samsung,coreprimevelte MAINTAINERS: add myself as Marvell PXA1908 maintainer .../devicetree/bindings/arm/mrvl/mrvl.yaml | 5 + .../devicetree/bindings/clock/marvell,pxa1908.yaml | 48 +++ MAINTAINERS | 9 + arch/arm64/Kconfig.platforms | 11 + arch/arm64/boot/dts/marvell/Makefile | 3 + .../dts/marvell/pxa1908-samsung-coreprimevelte.dts | 333 +++++++++++++++++++++ arch/arm64/boot/dts/marvell/pxa1908.dtsi | 295 ++++++++++++++++++ drivers/clk/mmp/Makefile | 2 +- drivers/clk/mmp/clk-frac.c | 57 ++-- drivers/clk/mmp/clk-mmp2.c | 6 +- drivers/clk/mmp/clk-of-mmp2.c | 26 +- drivers/clk/mmp/clk-of-pxa168.c | 4 +- drivers/clk/mmp/clk-of-pxa1908.c | 328 ++++++++++++++++++++ drivers/clk/mmp/clk-of-pxa1928.c | 6 +- drivers/clk/mmp/clk-of-pxa910.c | 4 +- drivers/clk/mmp/clk-pxa168.c | 4 +- drivers/clk/mmp/clk-pxa910.c | 4 +- drivers/clk/mmp/clk.h | 10 +- drivers/gpio/gpio-pxa.c | 1 + include/dt-bindings/clock/marvell,pxa1908.h | 88 ++++++ 20 files changed, 1180 insertions(+), 64 deletions(-) --- base-commit: 52a93d39b17dc7eb98b6aa3edb93943248e03b2f change-id: 20230803-pxa1908-lkml-6830e8da45c7 Best regards, -- Duje Mihanović