From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796500307; b=fRo3seuOYJY04RgBdXU9rAqHCl4wcTMcLDo9A/xlqm5NHVueae2CoMSIfbRiZCtzp481 46eObIUbJ0FRI3zGfLETFDvCcW1UJbXec4FPG5OUkqLIfJ/MNtmLWnM0HVbpw7ARMC/B4 OVRFAzv6ZrB8UeMHkz43caupzc2/sZp1B0OJUBJ1ROI0aTBNE1O1UtjCH9OA1vkN2yn/S 4mifo0gi1O2h4rDlSEyRB59xCTTyNiiasSysv5LjsP4u08lnNorBMIkqsFqBu4IXxdrh5 uvZD43ImEvfgeVY9MlUCi+s4S/YEbILsHIP2RZEKiAFPWXeYdKHLyE9JmNMnniJfyjg== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796500307; h=Received:DKIM-Signature:Received:From:Date:Subject:MIME-Version: Content-Type:Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=5L48cUpvP9wYSzQDueu8a42AEYB6cQlt/uD9bL5FvBk=; b=NK0OIfnO8v7vrEn1578n7OBFUJZUDD37OnOzwhdP9LLvAtd2oW++/I23q/SiAlkJecHf srIGo91MtsFZ7NMxN5rqsObLPATzj7bxnEfMUSz3s2Pg4PWWi/KQif4HLdzb4qxrvoLmG DYWvvtqmGdURlLOr1unthHwBC8hTHB0S6ih6RPJOu6Zqk2oJPbkrx088A4URte+UNqSd7 Q0Tg5gqKjTJMJBySA9q89t0TBW4qqniNlbbpwzHA9K5BPqB5RN2ZbO81uomVO0vUtFI5F o+bJAH8XF5CThjJ6spDlf68tlR0GevKhLLWFouQ4Q94qeDg//aMCayMUaEcId2pSQaQ== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=cEhZvDao; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8A2C2606A339; Sat, 5 Dec 2026 19:51:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=cEhZvDao Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1796500307; b=YaexgWDaTVVCqYS+vbsH410AEQA1G4zAliOBC2smjhl5xvgsOQvJGQ9F8TP/a6BmfnN6 /rVHIbB3gNUeEXyeAPitHwHKILLX2BHgW8GMNq3QT8tYWrGhcwvbhpU5RE2TFHLLrfT3s Tv+wnNZb5lpTw/FedWoYoFk9tN+T2iYU+k5AISwqc+0IgU0t7ikPecD9GHfs/fIfN7dgL er+m0zD24JD2Oph8pOMp/axH/YmQdfNqmtQwgOe9sw+42mOx6HrxHKrQ0a2wQYU69ZxX0 LOylGgu1WHf3g7bO43JXZeMnyWfe3SFzlRiHelfIKT5uYBankEj5Om/MvciUx81Ug1Q== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1796500307; h=DKIM-Signature:Received:From:Date:Subject:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=5L48cUpvP9wYSzQDueu8a42AEYB6cQlt/uD9bL5FvBk=; b=OCLSNZRDlieaUjqAe191/0kHAPj4YQNQX++3eaqLbSy4WepsCEo2hCo1ppfspzz6gv2u ptXOVAhLBZZcMbu+GEg929xjW62tVj2KqaEI9fg+MAFckMWF8Z1BotJ7Um1VH5qg4ZKkv AT6nzzl7lG2GVFQFN65B5r2itopr6LjALqf3DLdAnIZ1vdwArfMgbewM5pdJBDoeT5ByC x0zA+qPQN2qzAFiroEEzlFqyo15D5tv3VsTOp6NaBIbpRBkX7a5ptKhO55KujxN8O4K7b AW3PFkqPNfJ+PFXX9wnPW/eGPsB+MNa0U6wjPLd4e8JHPf1lghPpC3JouH9HLCwT9iA== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id C1FEB1F00936; Sat, 5 Dec 2026 19:51:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796500307; bh=5L48cUpvP9wYSzQDueu8a42AEYB6cQlt/uD9bL5FvBk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To; b=cEhZvDaoqB12aTUY5UObJQ3Wjcg27KVoy4WarSy083XRMTAltN19wsURi9PUOJ98M XVCVVmvi8KNtgJDjG3F6S5uneycSnR2Y5GvbRcWWRi1HvQsJqIKP/xLiAzFWsAOXT4 DTVHYm4XZPu8Wc6QBS5HWdo7u6n7kZRTF7Gp2sGJAAvedTr6zxPfHwrURD+HBJrcyg N5/e2t89ZqosT7SJ+Nb7uSfvvk+x+4DvITFiHfoP7GuyXrxZwRYq3A6Xa89/eBvPMG yoexbLCW1kwMTtYoWC3U0VAXNhtdo/uVAOnUHNDpCFb/ClfrG4MS1sb83pdOcsp/+2 tMTliV3RyDXqw== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 4DB4F50455; Sat, 5 Dec 2026 19:51:45 +0000 (UTC) From: Fil Dunsky via B4 Relay Date: Sat, 05 Dec 2026 22:51:44 +0300 Subject: [PATCH v4 1/3] ARM: dts: cortina: Describe CS7542 peripheral controllers X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Message-Id: <20261205-b4-cs7542-peripherals-dts-v4-1-f4e93d42533a@gmail.com> References: <20261205-b4-cs7542-peripherals-dts-v4-0-f4e93d42533a@gmail.com> In-Reply-To: <20261205-b4-cs7542-peripherals-dts-v4-0-f4e93d42533a@gmail.com> To: Russell King , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Kees Cook , Tony Luck , "Guilherme G. Piccoli" Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Fil Dunsky X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1796500303; l=12711; i=filipp.dunsky@gmail.com; s=20260930; h=from:subject:message-id; bh=ncIs+/tZ50vwgJd9C9xCLOsmbfMOLvSogVMOijZG5Ps=; b=NJSj6ST/L8JSZDvVEjp3AKUpJgpzre4qqd8sqtcSkHgladPDsjiXLaAARi2JktgaaJF9zv1r5 odbIhTRthvhCzwh5/FmOsEx+JdcCokjQVU0BbbGdBaFdIpjp/gnQKwt X-Developer-Key: i=filipp.dunsky@gmail.com; a=ed25519; pk=JAYP8e2rJ54DHOmhNtXud8rl1igAaAXoOHxtJmVXI1g= X-Endpoint-Received: by B4 Relay for filipp.dunsky@gmail.com/20260930 with auth_id=1085 X-Original-From: Fil Dunsky Reply-To: filipp.dunsky@gmail.com Content-Transfer-Encoding: 7bit From: Fil Dunsky Describe the shared global clock and pin controllers, peripheral interrupt controller and GPIO banks, I2C, RTC, TRNG, NAND PIO controller, MDIO, network engine and three PCIe root ports. Use the global syscon for clocks and resets, a separate PCIe PHY provider and the complete exclusive Ethernet DMA/reset domain. Keep the optional controllers disabled until the board supplies wiring, reserved memory and endpoint descriptions. Replace the fixed APB assumption with strap-selected clocks. Migrate the existing UART and watchdog clock consumers and remove the board APB-rate override in this same patch, so the board remains buildable after each commit. Signed-off-by: Fil Dunsky --- .../dts/cortina/cs7542-securifi-almondplus.dts | 4 - arch/arm/boot/dts/cortina/cs7542.dtsi | 321 ++++++++++++++++++++- 2 files changed, 311 insertions(+), 14 deletions(-) diff --git a/arch/arm/boot/dts/cortina/cs7542-securifi-almondplus.dts b/arch/arm/boot/dts/cortina/cs7542-securifi-almondplus.dts index e3152fd1db..2da3645927 100644 --- a/arch/arm/boot/dts/cortina/cs7542-securifi-almondplus.dts +++ b/arch/arm/boot/dts/cortina/cs7542-securifi-almondplus.dts @@ -37,10 +37,6 @@ }; }; -&apb_clk { - clock-frequency = <150000000>; -}; - &uart0 { status = "okay"; }; diff --git a/arch/arm/boot/dts/cortina/cs7542.dtsi b/arch/arm/boot/dts/cortina/cs7542.dtsi index 29b0b7da86..3d827502c9 100644 --- a/arch/arm/boot/dts/cortina/cs7542.dtsi +++ b/arch/arm/boot/dts/cortina/cs7542.dtsi @@ -3,6 +3,8 @@ * Device Tree Source for the Cortina Systems CS7542 SoC */ +#include +#include #include / { @@ -10,11 +12,10 @@ #size-cells = <1>; interrupt-parent = <&gic>; - /* Rate is selected by the boot strap pins, set by the board */ - apb_clk: clock-apb { + ref24: clock-24mhz { compatible = "fixed-clock"; #clock-cells = <0>; - clock-output-names = "apb"; + clock-frequency = <24000000>; }; cpus { @@ -26,6 +27,7 @@ compatible = "arm,cortex-a9"; reg = <0>; next-level-cache = <&l2>; + clocks = <&global CS7542_CLK_CPU>; }; cpu@1 { @@ -35,6 +37,7 @@ enable-method = "cortina,cs7542-smp"; cpu-release-addr = <0 0xf00000b8>; next-level-cache = <&l2>; + clocks = <&global CS7542_CLK_CPU>; }; }; @@ -44,11 +47,227 @@ #address-cells = <1>; #size-cells = <1>; + pcie0: pcie@80000000 { + compatible = "cortina,cs7542-pcie"; + reg = <0x80000000 0x1000>, <0x80001000 0x1000>, <0xf00a0000 0x100>; + reg-names = "dbi", "config", "app"; + #address-cells = <3>; + #size-cells = <2>; + device_type = "pci"; + linux,pci-domain = <0>; + bus-range = <0 0xff>; + num-lanes = <1>; + ranges = <0x82000000 0 0x80200000 0x80200000 0 0x1fe00000>; + interrupts = ; + interrupt-names = "msi"; + clocks = <&global CS7542_CLK_PCIE0>; + resets = <&global CS7542_RESET_PCIE0>; + phys = <&serdes 0>; + phy-names = "pcie"; + #interrupt-cells = <1>; + interrupt-map-mask = <0 0 0 7>; + interrupt-map = <0 0 0 1 &pcie0_intc 1>, + <0 0 0 2 &pcie0_intc 2>, + <0 0 0 3 &pcie0_intc 3>, + <0 0 0 4 &pcie0_intc 4>; + status = "disabled"; + + pcie0_port: pcie@0,0 { + compatible = "pciclass,0604"; + reg = <0 0 0 0 0>; + device_type = "pci"; + #address-cells = <3>; + #size-cells = <2>; + ranges; + }; + + pcie0_intc: interrupt-controller { + #address-cells = <0>; + #interrupt-cells = <1>; + interrupt-controller; + }; + }; + + pcie1: pcie@a0000000 { + compatible = "cortina,cs7542-pcie"; + reg = <0xa0000000 0x1000>, <0xa0001000 0x1000>, <0xf00a0400 0x100>; + reg-names = "dbi", "config", "app"; + #address-cells = <3>; + #size-cells = <2>; + device_type = "pci"; + linux,pci-domain = <1>; + bus-range = <0 0xff>; + num-lanes = <1>; + ranges = <0x82000000 0 0xa0200000 0xa0200000 0 0x1fe00000>; + interrupts = ; + interrupt-names = "msi"; + clocks = <&global CS7542_CLK_PCIE1>; + resets = <&global CS7542_RESET_PCIE1>; + phys = <&serdes 1>; + phy-names = "pcie"; + #interrupt-cells = <1>; + interrupt-map-mask = <0 0 0 7>; + interrupt-map = <0 0 0 1 &pcie1_intc 1>, + <0 0 0 2 &pcie1_intc 2>, + <0 0 0 3 &pcie1_intc 3>, + <0 0 0 4 &pcie1_intc 4>; + status = "disabled"; + + pcie1_port: pcie@0,0 { + compatible = "pciclass,0604"; + reg = <0 0 0 0 0>; + device_type = "pci"; + #address-cells = <3>; + #size-cells = <2>; + ranges; + }; + + pcie1_intc: interrupt-controller { + #address-cells = <0>; + #interrupt-cells = <1>; + interrupt-controller; + }; + }; + + pcie2: pcie@c0000000 { + compatible = "cortina,cs7542-pcie"; + reg = <0xc0000000 0x1000>, <0xc0001000 0x1000>, <0xf00a0800 0x100>; + reg-names = "dbi", "config", "app"; + #address-cells = <3>; + #size-cells = <2>; + device_type = "pci"; + linux,pci-domain = <2>; + bus-range = <0 0xff>; + num-lanes = <1>; + ranges = <0x82000000 0 0xc0200000 0xc0200000 0 0x1fe00000>; + interrupts = ; + interrupt-names = "msi"; + clocks = <&global CS7542_CLK_PCIE2>; + resets = <&global CS7542_RESET_PCIE2>; + phys = <&serdes 2>; + phy-names = "pcie"; + #interrupt-cells = <1>; + interrupt-map-mask = <0 0 0 7>; + interrupt-map = <0 0 0 1 &pcie2_intc 1>, + <0 0 0 2 &pcie2_intc 2>, + <0 0 0 3 &pcie2_intc 3>, + <0 0 0 4 &pcie2_intc 4>; + status = "disabled"; + + pcie2_port: pcie@0,0 { + compatible = "pciclass,0604"; + reg = <0 0 0 0 0>; + device_type = "pci"; + #address-cells = <3>; + #size-cells = <2>; + ranges; + }; + + pcie2_intc: interrupt-controller { + #address-cells = <0>; + #interrupt-cells = <1>; + interrupt-controller; + }; + }; + + global: syscon@f0000000 { + compatible = "cortina,cs7542-syscon", "syscon", "simple-mfd"; + reg = <0xf0000000 0x100>; + #clock-cells = <1>; + #reset-cells = <1>; + + pinctrl: pinctrl { + compatible = "cortina,cs7542-pinctrl"; + }; + }; + + ethernet: ethernet@f0010000 { + compatible = "cortina,cs7542-ethernet"; + reg = <0xf0010000 0x500>, + <0xf0090000 0x800>, <0xf0020000 0x4000>, + <0xf0030000 0x400>, <0xf0040000 0x800>, + <0xf0060000 0x100>, <0xf0400000 0x100000>; + reg-names = "ni", "dma", "fe", "qm", "tm", + "sch", "xram"; + interrupts = , + , + ; + interrupt-names = "eth0", "eth1", "eth2"; + resets = <&global CS7542_RESET_NI>, + <&global CS7542_RESET_FE>, + <&global CS7542_RESET_TM>, + <&global CS7542_RESET_SCH>, + <&global CS7542_RESET_QM>, + <&global CS7542_RESET_DMA>, + <&global CS7542_RESET_NI_XRAM>; + reset-names = "ni", "fe", "tm", "sch", "qm", "dma", "xram"; + #address-cells = <1>; + #size-cells = <0>; + cortina,global-syscon = <&global>; + status = "disabled"; + + gmac0: ethernet-port@0 { + reg = <0>; + status = "disabled"; + }; + + gmac1: ethernet-port@1 { + reg = <1>; + status = "disabled"; + }; + + gmac2: ethernet-port@2 { + reg = <2>; + status = "disabled"; + }; + }; + + nandc: nand-controller@f0050000 { + compatible = "cortina,cs7542-nand"; + reg = <0xf0050000 0x300>, <0xe0000000 0x08000000>; + reg-names = "regs", "data"; + interrupts = ; + clocks = <&global CS7542_CLK_AXI>; + resets = <&global CS7542_RESET_FLASH>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + intc: interrupt-controller@f0070004 { + compatible = "cortina,cs7542-intc"; + reg = <0xf0070004 0x8>; + interrupts = ; + interrupt-controller; + #interrupt-cells = <1>; + }; + + mdio0: mdio@f00700a0 { + compatible = "cortina,cs7542-mdio"; + reg = <0xf00700a0 0x14>; + clocks = <&global CS7542_CLK_APB>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c: i2c@f00700e8 { + compatible = "cortina,cs7542-i2c"; + reg = <0xf00700e8 0x28>; + interrupt-parent = <&intc>; + interrupts = <11>; + clocks = <&global CS7542_CLK_APB>; + #address-cells = <1>; + #size-cells = <0>; + + status = "disabled"; + }; + uart0: serial@f0070110 { compatible = "cortina,cs7542-uart"; reg = <0xf0070110 0x30>; interrupts = ; - clocks = <&apb_clk>; + clocks = <&global CS7542_CLK_APB>; status = "disabled"; }; @@ -57,7 +276,7 @@ compatible = "cortina,cs7542-uart"; reg = <0xf0070140 0x30>; interrupts = ; - clocks = <&apb_clk>; + clocks = <&global CS7542_CLK_APB>; status = "disabled"; }; @@ -66,7 +285,7 @@ compatible = "cortina,cs7542-uart"; reg = <0xf0070170 0x30>; interrupts = ; - clocks = <&apb_clk>; + clocks = <&global CS7542_CLK_APB>; status = "disabled"; }; @@ -75,8 +294,90 @@ compatible = "cortina,cs7542-uart"; reg = <0xf00701a0 0x30>; interrupts = ; - clocks = <&apb_clk>; + clocks = <&global CS7542_CLK_APB>; + + status = "disabled"; + }; + + gpio0: gpio@f00701d0 { + compatible = "cortina,cs7542-gpio"; + reg = <0xf00701d0 0x20>; + interrupt-parent = <&intc>; + interrupts = <6>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio1: gpio@f00701f0 { + compatible = "cortina,cs7542-gpio"; + reg = <0xf00701f0 0x20>; + interrupt-parent = <&intc>; + interrupts = <7>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio2: gpio@f0070210 { + compatible = "cortina,cs7542-gpio"; + reg = <0xf0070210 0x20>; + interrupt-parent = <&intc>; + interrupts = <8>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio3: gpio@f0070230 { + compatible = "cortina,cs7542-gpio"; + reg = <0xf0070230 0x20>; + interrupt-parent = <&intc>; + interrupts = <9>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio4: gpio@f0070250 { + compatible = "cortina,cs7542-gpio"; + reg = <0xf0070250 0x20>; + interrupt-parent = <&intc>; + interrupts = <10>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + serdes: phy@f00a1000 { + compatible = "cortina,cs7542-pcie-phy"; + reg = <0xf00a1000 0x400>, <0xf00a5000 0x400>, + <0xf00a9000 0x400>, <0xf00a0e00 0x180>; + reg-names = "phy0", "phy1", "phy2", "status"; + clocks = <&ref24>; + cortina,global-syscon = <&global>; + #phy-cells = <1>; + }; + + trng: rng@f0600000 { + compatible = "cortina,cs7542-trng"; + reg = <0xf0600000 0x20>; + cortina,syscon = <&global>; + status = "disabled"; + }; + rtc0: rtc@f4920000 { + compatible = "cortina,cs7542-rtc"; + reg = <0xf4920000 0x50>; + interrupt-names = "alarm", "periodic"; + interrupt-parent = <&gic>; + interrupts = , + ; status = "disabled"; }; @@ -99,21 +400,21 @@ compatible = "arm,cortex-a9-global-timer"; reg = <0xf8000200 0x20>; interrupts = ; - clocks = <&apb_clk>; + clocks = <&global CS7542_CLK_APB>; }; timer@f8000600 { compatible = "arm,cortex-a9-twd-timer"; reg = <0xf8000600 0x20>; interrupts = ; - clocks = <&apb_clk>; + clocks = <&global CS7542_CLK_APB>; }; watchdog@f8000620 { compatible = "arm,cortex-a9-twd-wdt"; reg = <0xf8000620 0x20>; interrupts = ; - clocks = <&apb_clk>; + clocks = <&global CS7542_CLK_APB>; }; gic: interrupt-controller@f8001000 { -- 2.53.0