From patchwork Sun Feb 9 22:06:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Sverdlin X-Patchwork-Id: 13967116 Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 614D21E22FD for ; Sun, 9 Feb 2025 22:07:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739138828; cv=none; b=BUM10i+RlrgrYmUfEURUHd/HSzCfk1LjhPa+YFH8BhJBPMxwcOYKaEKOuJkNrG0rhw9UDdT0hdFhn3jqY+HHcRM1SA3dzfNrE6JjnZ75UDz0CckLQUOJ+fiZomjib5njZcOiBfl+p12bQg1UzD9D3pf6R03cqfo8hGvPjdDMgns= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739138828; c=relaxed/simple; bh=HSwTakDEq7geIH+aAtd+PpWDLojNiFPeJOnKu6Gghh8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=lO+eA72UV6hagv6HNnGEtGDF/IlwV3dK8klKXKkbFOjYL6uwRFef6q4iUNBZD6K5fORf9FSpMKO0AvunBVnILTbYHESoiHWcz4fdF8S4osUmvOF8cYDdlQJ8H3Hqycw8ap0GwA99dnsuCH0kQR5x1UukcVehKZqMCB1v0Az+HMQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=GX7oAsVQ; arc=none smtp.client-ip=209.85.221.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GX7oAsVQ" Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-38dd14c99c3so851600f8f.3 for ; Sun, 09 Feb 2025 14:07:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739138825; x=1739743625; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=0SStEyTofDPhfx4JhlqbX9qCANFPRgD9nwadZXdsKAw=; b=GX7oAsVQUaDu2CluXuaVrIKHVo8Af6kTZBSp4IjFjoMuNv1fsB6GZ8V0/+Iln22gYH 3PqUHJSzCuIbnnk5twbipgCGO/RfW4cgAwZbpmUug21Gi+V+HsktAy5p3s+cQlxZ3uBn 2ylViRRXPZhO8VYosS3zrDgEw1RlrX2h0a/hVWaRB65paFMFuhrQtPlyrIHVY2afgvvP EBlFyHUMRghRWoClVw/W+eJmogG046YrUCi+jxG1nr1sZamUw0ubxCxakkL2AHh7BwP8 F4Tn51MhBbkIo6Ts5KmxEYrmnEZqFbyqrfbs3cCvP2jGXiFzZeDacOjdjqViR+hCF2SO zCyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739138825; x=1739743625; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0SStEyTofDPhfx4JhlqbX9qCANFPRgD9nwadZXdsKAw=; b=h0w7KbTLyOVXnhD+coHD1/WsK8fH3YSdVK0RrYvipwiijM+9vY8mxAjSuPfjTOrGkN lo1wTcs+IIETTc9ppEamf/naiNHLFdbov535iZg3lvdP9P5kqPaJk0C/xYLOl5JHLoMX LAYuSW9LRT1Z39vGqDtujzjlyf4lD7YBHQTB9i+WWT6GxFSMOEFitnR77ER7+knVVm7S D2PLpiWh7Asf2tjviiseU5LJvK0r+rm8FpMCSIeCNxQJKWyegcqq/dEvepSJWZPPvJSd ec3otl9uuIbJm+od1Zey1UBQmzVRbC2a8DCF7osxL7sK/usruC5C79BkCqXjABPB+oKT dJww== X-Gm-Message-State: AOJu0YxqzciA3F5B2HAqsNGrzLtck4TJgnGz1c+BaxrFUj76PIozrKEQ fqNg3OjvVbirJcaLEbH1kF74gI+yfPTx77ETK+ikIQjACQzaGK2kROl7xnbB X-Gm-Gg: ASbGncuTc80WwW24cVd+Ox5VZUY0Q2C6DJaB69NutG+3bqAvsMna3IsL6u2zM/EVJ0C IN+DfHrFboqaa0c8RgZoT2x8V+21+4lVeSgTdhDXPh1RdrymBljKcjffZDhnR3hRR3wTVCRUORT mhCc0HSPXU8yLTFGYt5e0HqxWW35yjzJtndOvAlP4gSG0nNVnyV4eHfEN/OogRH/DgIM76k+XhN D4VGoUmnlU+bjJLztxL97QlduGtS4fYhiTCh5V0fnN9hVX60S9xhnAdR0q1dIaiUWMggnx66FhK 4Qr9bH7cKLXWhlomYQvAjsbW0ogL X-Google-Smtp-Source: AGHT+IGaYGcJZM+92Cv8nPvpHOwYc6gunMtsp2ldN4nyyr8ek9G+l/o+4jLNm5KeXzDP/LDAiB9c+A== X-Received: by 2002:a5d:5f88:0:b0:38d:dffc:c133 with SMTP id ffacd0b85a97d-38ddffcc58cmr305497f8f.44.1739138824394; Sun, 09 Feb 2025 14:07:04 -0800 (PST) Received: from giga-mm.. ([2a02:1210:861b:6f00:82ee:73ff:feb8:99e3]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38dbf2ed900sm10386544f8f.53.2025.02.09.14.07.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Feb 2025 14:07:03 -0800 (PST) From: Alexander Sverdlin To: soc@lists.linux.dev Cc: Alexander Sverdlin , Chen Wang , Inochi Amaoto , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Philipp Zabel , Catalin Marinas , Will Deacon , Arnd Bergmann , Paul Walmsley , Palmer Dabbelt , Albert Ou , Sebastian Reichel , devicetree@vger.kernel.org, Haylen Chu , linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, linux-pm@vger.kernel.org Subject: [PATCH 00/10] arm64 support for Milk-V Duo Module 01 EVB Date: Sun, 9 Feb 2025 23:06:25 +0100 Message-ID: <20250209220646.1090868-1-alexander.sverdlin@gmail.com> X-Mailer: git-send-email 2.48.1 Precedence: bulk X-Mailing-List: soc@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 This series adds very basic support for Milk-V Duo Module 01 EVB [1] in arm64 mode. The SoC (SG2000) is dual-arch, RiscV and ARM64, the latter has been chosen because the upstream toolchain can be utilized. Sophgo SG2000 seems to be a continuation of the Cvitek CV18xx series, same peripherals with an addition of ARM64 core. Therefore it would be beneficial not to copy-paste the peripherals' device-tree, but rather split the most suitable riscv DT into ARCH-specific and peripherals parts and just include the latter on the arm64 side. This series adds the device-tree for Milk-V Duo Module 01 EVB, which in turn contains Milk-V Duo Module 01 (separate .dtsi) on it, which has SG2000 SoC inside (separate .dtsi). This series has been tested with Sophgo-provided U-Boot binary [2]: it boots from SD card, pinctrl, serial, GPIO drivers are functional (same as for RiscV-based CV18xx SoCs). New reset driver is provided as an alternative to the ATF PSCI handler, which Sophgo only provides in binary form. Partial SoC documentation is available [3]. This series lacks the support of: - USB - Audio - Ethernet - WiFi - Bluetooth - eMMC - Video It would probably make sense that the whole series would go into SOC tree, even though technically nothing prevents the reboot/reset driver to come in PM/reset tree. If everything would come together, `reboot` command would work out of the box. [1] https://milkv.io/docs/duo/getting-started/duo-module-01 [2] https://github.com/milkv-duo/duo-buildroot-sdk-v2/releases/ [3] https://github.com/sophgo/sophgo-doc/releases/download/sg2000-trm-v1.01/sg2000_trm_en.pdf Alexander Sverdlin (10): arm64: Add SOPHGO SOC family Kconfig support riscv: dts: sophgo: cv18xx: Split into CPU core and peripheral parts arm64: dts: sophgo: Add initial SG2000 SoC device tree arm64: dts: sophgo: Add Duo Module 01 arm64: dts: sophgo: Add Duo Module 01 Evaluation Board dt-bindings: mfd: syscon: Add Cvitek CV18xx rtcsys core and ctrl compatible dt-bindings: reset: sophgo: Add CV18xx reset controller riscv/arm64: dts: cv18xx: Add sysctl and reset nodes power: reset: cv18xx: New driver arm64: defconfig: Enable rudimentary Sophgo SG2000 support .../devicetree/bindings/mfd/syscon.yaml | 4 + .../bindings/reset/sophgo,cv1800-reset.yaml | 38 ++ MAINTAINERS | 1 + arch/arm64/Kconfig.platforms | 12 + arch/arm64/boot/dts/Makefile | 1 + arch/arm64/boot/dts/sophgo/Makefile | 2 + arch/arm64/boot/dts/sophgo/sg2000.dtsi | 79 +++++ .../sophgo/sg2000_milkv_duo_module_01.dtsi | 84 +++++ .../sophgo/sg2000_milkv_duo_module_01_evb.dts | 30 ++ arch/arm64/configs/defconfig | 3 + arch/riscv/boot/dts/sophgo/cv181x.dtsi | 2 +- arch/riscv/boot/dts/sophgo/cv18xx-periph.dtsi | 329 ++++++++++++++++++ arch/riscv/boot/dts/sophgo/cv18xx.dtsi | 305 +--------------- drivers/power/reset/Kconfig | 12 + drivers/power/reset/Makefile | 1 + drivers/power/reset/cv18xx-reset.c | 89 +++++ 16 files changed, 689 insertions(+), 303 deletions(-) create mode 100644 Documentation/devicetree/bindings/reset/sophgo,cv1800-reset.yaml create mode 100644 arch/arm64/boot/dts/sophgo/Makefile create mode 100644 arch/arm64/boot/dts/sophgo/sg2000.dtsi create mode 100644 arch/arm64/boot/dts/sophgo/sg2000_milkv_duo_module_01.dtsi create mode 100644 arch/arm64/boot/dts/sophgo/sg2000_milkv_duo_module_01_evb.dts create mode 100644 arch/riscv/boot/dts/sophgo/cv18xx-periph.dtsi create mode 100644 drivers/power/reset/cv18xx-reset.c