From patchwork Tue Sep 3 04:06:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Drew Fustini X-Patchwork-Id: 825075 Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) (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 A31AA1CDFDA for ; Tue, 3 Sep 2024 04:08:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725336537; cv=none; b=Q6HY+YdeK3rru4QJaTwwqNT+BqhQx7jiP5ChuqD3mquyTcKfByMuvLbQTH9oFbo1EpoMGbisoGNCfxqDgM/Dpgya4jXKa/nsbbeb07kqWL/eFjSaev+r2SS4q7JGw4jqDHNgJ1EnGKiJbrxkPVziEw9VfN+nXf2W9yj0EwY37xc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725336537; c=relaxed/simple; bh=5wWZ7techati+aOfPvJMxyFSH5Wti/es60OR5gL0P5E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=fV1CvS3w8X2ghwouih7/0PggPGQcY6PR5H0xoVdDvyI1pgDXas9Yw9CFsxX/srE1el/mk3OdSEK77GwysMWhOurWyrCao6CnkD8NSwCgMDEit/pqd6ivhkn8al2AmPM5qTevG+flmSezj1G29W1wxcyI/oVET/vgo4l3jvU+TwA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=tenstorrent.com; spf=pass smtp.mailfrom=tenstorrent.com; dkim=pass (2048-bit key) header.d=tenstorrent.com header.i=@tenstorrent.com header.b=TcVzvmWf; arc=none smtp.client-ip=209.85.210.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=tenstorrent.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tenstorrent.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tenstorrent.com header.i=@tenstorrent.com header.b="TcVzvmWf" Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-7141b04e7b5so2840079b3a.2 for ; Mon, 02 Sep 2024 21:08:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tenstorrent.com; s=google; t=1725336535; x=1725941335; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=NiQQIOurN5s0FJRXD43MLGWhBSOLzbp34+DraYLBvAg=; b=TcVzvmWf7sHy4I7+fBP5fDmLBa+ZDCBWzmMGx16iF7wx8ARTj+lCmQvM7XvNyE321m fiL/gyeoncbRe55l426JX573lq1QDuiuZi+1EgDd3sC7rIl5AwAHTsXo2+8Nv7ygD8f4 pQYLQfB3+VMLZ1JlEAfkZkcoorj4QeqBTzhi2BhbyLsH3LXzeT8Mf4V8YMxtO/uUTajg KmNz9nbdvR+IsFuTzjhF8tbNblD/G3a6YYs7KQsZvkZavzGSw72s42Po4kJFzQGgyz9Q Z10xVXKE1mjEdzPIbjaCDIsSRtiG0VPky5YTTC8W+YaKJsH08xGA/qV1OTuIxLOT2MrX W/ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725336535; x=1725941335; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NiQQIOurN5s0FJRXD43MLGWhBSOLzbp34+DraYLBvAg=; b=kgsHyI7LC9ChnvVFD6ZMVO4nrK7Lvf4NEPUiqHusI6+AoOWythgTQgg73VrCh62Rw1 nzPrmLwf1Vq+ZZwk3lakyJ7l4Q/pruVz8OzYoI9r3eqPW4jxJGH82Ky+dMhSGwrBHNZb zSjoSnMJ53BQLVUwx5BDWudJSBmeJj/IQHy/nvG1U4M/p3F9RWj7KbQwA7l3mar8lfZP uoX/s2rW8CiTe9/Olrj6FFuW28xtHBakNLoPFXukrQgp8YyeA6+XL+S6sc2byYr9/ps+ 0O8JKItPs0So4qn8R2rIaEdfBI1d0P5Tuz7A6VY+avMcNEeOSJ/+P/uTWQVAOICJMCr6 6DSg== X-Forwarded-Encrypted: i=1; AJvYcCUnMHnZVcuSnTG9uhr8gyk1bh5fQXyRfkvGMwencj62FiyIdHa2ojA4LfPIUVgIGR0riPij1kcagX8h@vger.kernel.org X-Gm-Message-State: AOJu0YzjIs+gWOFERUa6q2H+TSEgkhl8xG1vmB5spkE3qYbZVeb+InNa YVXf1hxBSdn17YGR0VS1emoi8V8ostenFFCUB4klwRPZLILieAJs1HBPBkgDeEc= X-Google-Smtp-Source: AGHT+IGzyiuhlkMwYG0YMzdnnd3LOlKnGZxIN1H4tU/WAf0wybOl/XWFUTDfriwcPu5zruQGDsplqg== X-Received: by 2002:a05:6a00:13a6:b0:70b:5394:8cae with SMTP id d2e1a72fcca58-715dfc76152mr19057737b3a.28.1725336534809; Mon, 02 Sep 2024 21:08:54 -0700 (PDT) Received: from [127.0.1.1] (75-164-215-68.ptld.qwest.net. [75.164.215.68]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-715e569ef39sm7532701b3a.122.2024.09.02.21.08.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Sep 2024 21:08:54 -0700 (PDT) From: Drew Fustini Date: Mon, 02 Sep 2024 21:06:56 -0700 Subject: [PATCH 3/8] riscv: dts: thead: Add TH1520 pin control nodes Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240902-th1520-pinctrl-v1-3-639bf83ef50a@tenstorrent.com> References: <20240902-th1520-pinctrl-v1-0-639bf83ef50a@tenstorrent.com> In-Reply-To: <20240902-th1520-pinctrl-v1-0-639bf83ef50a@tenstorrent.com> To: Drew Fustini , Guo Ren , Fu Wei , Linus Walleij , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Emil Renner Berthing , Thomas Bonnefille , Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: linux-riscv@lists.infradead.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Drew Fustini X-Mailer: b4 0.14.1 From: Emil Renner Berthing Add nodes for pin controllers on the T-Head TH1520 RISC-V SoC. Tested-by: Thomas Bonnefille Signed-off-by: Emil Renner Berthing Signed-off-by: Drew Fustini --- arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts | 4 ++++ .../boot/dts/thead/th1520-lichee-module-4a.dtsi | 4 ++++ arch/riscv/boot/dts/thead/th1520.dtsi | 24 ++++++++++++++++++++++ 3 files changed, 32 insertions(+) diff --git a/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts b/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts index d9b4de9e4757..be85e3aee56e 100644 --- a/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts +++ b/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts @@ -44,6 +44,10 @@ &osc_32k { clock-frequency = <32768>; }; +&aonsys_clk { + clock-frequency = <73728000>; +}; + &apb_clk { clock-frequency = <62500000>; }; diff --git a/arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi b/arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi index 1365d3a512a3..530648ad64f6 100644 --- a/arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi +++ b/arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi @@ -25,6 +25,10 @@ &osc_32k { clock-frequency = <32768>; }; +&aonsys_clk { + clock-frequency = <73728000>; +}; + &apb_clk { clock-frequency = <62500000>; }; diff --git a/arch/riscv/boot/dts/thead/th1520.dtsi b/arch/riscv/boot/dts/thead/th1520.dtsi index 3c9974062c20..834dcd1fe7d8 100644 --- a/arch/riscv/boot/dts/thead/th1520.dtsi +++ b/arch/riscv/boot/dts/thead/th1520.dtsi @@ -215,6 +215,12 @@ osc_32k: 32k-oscillator { #clock-cells = <0>; }; + aonsys_clk: aonsys-clk { + compatible = "fixed-clock"; + clock-output-names = "aonsys_clk"; + #clock-cells = <0>; + }; + apb_clk: apb-clk-clock { compatible = "fixed-clock"; clock-output-names = "apb_clk"; @@ -357,6 +363,12 @@ portd: gpio-controller@0 { }; }; + padctrl1_apsys: pinctrl@ffe7f3c000 { + compatible = "thead,th1520-pinctrl"; + reg = <0xff 0xe7f3c000 0x0 0x1000>; + clocks = <&apb_clk>; + }; + gpio0: gpio@ffec005000 { compatible = "snps,dw-apb-gpio"; reg = <0xff 0xec005000 0x0 0x1000>; @@ -393,6 +405,12 @@ portb: gpio-controller@0 { }; }; + padctrl0_apsys: pinctrl@ffec007000 { + compatible = "thead,th1520-pinctrl"; + reg = <0xff 0xec007000 0x0 0x1000>; + clocks = <&apb_clk>; + }; + uart2: serial@ffec010000 { compatible = "snps,dw-apb-uart"; reg = <0xff 0xec010000 0x0 0x4000>; @@ -529,6 +547,12 @@ porte: gpio-controller@0 { }; }; + padctrl_aosys: pinctrl@fffff4a000 { + compatible = "thead,th1520-pinctrl"; + reg = <0xff 0xfff4a000 0x0 0x2000>; + clocks = <&aonsys_clk>; + }; + ao_gpio1: gpio@fffff52000 { compatible = "snps,dw-apb-gpio"; reg = <0xff 0xfff52000 0x0 0x1000>; From patchwork Tue Sep 3 04:06:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Drew Fustini X-Patchwork-Id: 825074 Received: from mail-oa1-f42.google.com (mail-oa1-f42.google.com [209.85.160.42]) (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 0D05C1CE710 for ; Tue, 3 Sep 2024 04:08:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725336538; cv=none; b=q6Ek3N3L25C3xQFR6uY9aSaEp93ZvGR/E2Qr31WCQOnl4Ryh2wdj6Qtzt5lUWWGzPkjy5g3hhVXEfyl7v76XZRwiJ002761R+9i+JnBRm86Q07Oq+md/oQ1c2yhhYayRhMogxFlqYdn1m68B+WNWn4qMpeAOKmF6qdbYrr67QxA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725336538; c=relaxed/simple; bh=TmLPgmMuQA5WHRw4DbLGENXxsmigBRHBovUbmz2xWfc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=eTdCtGXcgGJ/nBoBhgz9bjY/tBrfsXTqxDYv0w+Yq7TbPWC/hqpdm5S3lW0CmKD6slzYMSYw/BRS0YMdRhwKkMnqGZ33Nm/s5vHYONJ1U5pK7BatQKcjwnNsJU01garFcEQuds7Kx2evRuSS8jejmAfYIlHj2m4t9tWYOvoS7VI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=tenstorrent.com; spf=pass smtp.mailfrom=tenstorrent.com; dkim=pass (2048-bit key) header.d=tenstorrent.com header.i=@tenstorrent.com header.b=AOh/KCAg; arc=none smtp.client-ip=209.85.160.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=tenstorrent.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tenstorrent.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tenstorrent.com header.i=@tenstorrent.com header.b="AOh/KCAg" Received: by mail-oa1-f42.google.com with SMTP id 586e51a60fabf-2689e7a941fso2775692fac.3 for ; Mon, 02 Sep 2024 21:08:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tenstorrent.com; s=google; t=1725336536; x=1725941336; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=kZ4BL5w+jZbnBcrACJr3d5UErDD67jcver4i8Xfl9kU=; b=AOh/KCAg/2WIWnBfkuuarMIWpSSyRkWHP7n8qKiPoXTJpluQqdI1D7w0MzDPwwLVSd AZbDYPgDK42w29bIqz9XRnVfeweLozdUC+alQ0FTJge8j6rmqSDZz6yTPnjXSErrVh0N tKe1kT81ryVZpPJqN5IaQu9BbBANJ8nGyTI8zuYAqbwqDy9bkSjVHJVABi5w1VbDwn3U rnAwTI+w2LzFugbMPjWro08wyPpQk5ybQXf+Qmj1dAiN40y7+q7gLuIBnkj/lDIkiTcG o+VNoK9ibo9zMCP7PtTbwTnU2vZSfupzx4xm/fJ5xUT5jJXm8R02F7J5OuhJX6LMtaL5 PoBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725336536; x=1725941336; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kZ4BL5w+jZbnBcrACJr3d5UErDD67jcver4i8Xfl9kU=; b=u9puKnsKI0RBzn4Ed1rNrVO5yI08UsTqI29WHYzqz31s2Q3AT99vr/sQzVQgCoq14E GfM+7SNn37CtoNhIs8B+PVBBveeq7vST9YiXLNfhBNqDqHGrk3rS+ipOlXPE1Jq512uj 6IQlXT9j52xzaX94CbwS6TYY5C5/B/qsM2gT4uCZ/h3BLPDB+vn14ag4+e2DwrpC3nTS 7UrVzpB8aW+HT6duBa4jBqMIictGLer6dzOfXV30E8vioKHxvUa4hIxXdZOC5mx7i2Zx U6qi2cSx4yjFCAQWWjVqM/PaGboIPVaf9fgbe7fOJXcWDPbPXCszeB/DPN8cE+CTzrl3 Gixw== X-Forwarded-Encrypted: i=1; AJvYcCU44i2C/gCVKTbJ5Rv09KpGA9/Ev7//LOJJrDetNAGn+Ad37Y56S80d3RvuwTblOE+x7xXn3lXlQCHm@vger.kernel.org X-Gm-Message-State: AOJu0YwUPbPLw60gSk6ZLKOoy8GOyqHz21rTBjKtRhsdzrO3iOV5i7tM splAt0IbL6b4UHBo4mbFQ0qIOTRf/uQ4Bkvu7tVRjbPTzuzan8FdFTh866CcFVQ= X-Google-Smtp-Source: AGHT+IF4pX9A1K6vCNuazJY8FE8Q32M3mUa+nGa1uX74lj9BVRLLaU+asl6F6Kfv3PXZHMCKYZWoVQ== X-Received: by 2002:a05:6871:1c2:b0:270:1850:f898 with SMTP id 586e51a60fabf-2781a7aa5c2mr1087930fac.12.1725336535908; Mon, 02 Sep 2024 21:08:55 -0700 (PDT) Received: from [127.0.1.1] (75-164-215-68.ptld.qwest.net. [75.164.215.68]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-715e569ef39sm7532701b3a.122.2024.09.02.21.08.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Sep 2024 21:08:55 -0700 (PDT) From: Drew Fustini Date: Mon, 02 Sep 2024 21:06:57 -0700 Subject: [PATCH 4/8] riscv: dts: thead: Add TH1520 GPIO ranges Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240902-th1520-pinctrl-v1-4-639bf83ef50a@tenstorrent.com> References: <20240902-th1520-pinctrl-v1-0-639bf83ef50a@tenstorrent.com> In-Reply-To: <20240902-th1520-pinctrl-v1-0-639bf83ef50a@tenstorrent.com> To: Drew Fustini , Guo Ren , Fu Wei , Linus Walleij , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Emil Renner Berthing , Thomas Bonnefille , Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: linux-riscv@lists.infradead.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Drew Fustini X-Mailer: b4 0.14.1 From: Emil Renner Berthing Add gpio-ranges properties to the TH1520 device tree, so user space can change basic pinconf settings for GPIOs and are not allowed to use pads already used by other functions. Adjust number of GPIOs available for the different controllers. Acked-by: Rob Herring Tested-by: Thomas Bonnefille Signed-off-by: Emil Renner Berthing Signed-off-by: Drew Fustini --- arch/riscv/boot/dts/thead/th1520.dtsi | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/arch/riscv/boot/dts/thead/th1520.dtsi b/arch/riscv/boot/dts/thead/th1520.dtsi index 834dcd1fe7d8..9889b557c494 100644 --- a/arch/riscv/boot/dts/thead/th1520.dtsi +++ b/arch/riscv/boot/dts/thead/th1520.dtsi @@ -338,6 +338,7 @@ portc: gpio-controller@0 { gpio-controller; #gpio-cells = <2>; ngpios = <32>; + gpio-ranges = <&padctrl0_apsys 0 0 32>; reg = <0>; interrupt-controller; #interrupt-cells = <2>; @@ -355,7 +356,8 @@ portd: gpio-controller@0 { compatible = "snps,dw-apb-gpio-port"; gpio-controller; #gpio-cells = <2>; - ngpios = <32>; + ngpios = <23>; + gpio-ranges = <&padctrl0_apsys 0 32 23>; reg = <0>; interrupt-controller; #interrupt-cells = <2>; @@ -380,6 +382,7 @@ porta: gpio-controller@0 { gpio-controller; #gpio-cells = <2>; ngpios = <32>; + gpio-ranges = <&padctrl1_apsys 0 0 32>; reg = <0>; interrupt-controller; #interrupt-cells = <2>; @@ -397,7 +400,8 @@ portb: gpio-controller@0 { compatible = "snps,dw-apb-gpio-port"; gpio-controller; #gpio-cells = <2>; - ngpios = <32>; + ngpios = <31>; + gpio-ranges = <&padctrl1_apsys 0 32 31>; reg = <0>; interrupt-controller; #interrupt-cells = <2>; @@ -539,7 +543,8 @@ porte: gpio-controller@0 { compatible = "snps,dw-apb-gpio-port"; gpio-controller; #gpio-cells = <2>; - ngpios = <32>; + ngpios = <16>; + gpio-ranges = <&padctrl_aosys 0 9 16>; reg = <0>; interrupt-controller; #interrupt-cells = <2>; @@ -563,7 +568,8 @@ portf: gpio-controller@0 { compatible = "snps,dw-apb-gpio-port"; gpio-controller; #gpio-cells = <2>; - ngpios = <32>; + ngpios = <23>; + gpio-ranges = <&padctrl_aosys 0 25 22>, <&padctrl_aosys 22 7 1>; reg = <0>; interrupt-controller; #interrupt-cells = <2>; From patchwork Tue Sep 3 04:06:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Drew Fustini X-Patchwork-Id: 825073 Received: from mail-oi1-f174.google.com (mail-oi1-f174.google.com [209.85.167.174]) (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 066B71CF288 for ; Tue, 3 Sep 2024 04:08:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725336540; cv=none; b=X3Tmvlf2LREHldr+Hgo+ImBQKuElS9YovwRR2w6BNRlceV+Vw+B1dRXqu/47u2PK4eeQu4R8zHGc/9T0VRNffPTAZieGbxjOPLC1jPF6KL9QetXRL3E78fA97dWvx8UVBJ4uAjNjyU1eI4utlrZT6P0KTq0POqpUu6JJ3Yv7NNI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725336540; c=relaxed/simple; bh=nuMvhK4B2YL1JqNj2MIqtLUPJEThULLYeQBNub/zOuQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=BI2dKL3fUTt3SzfQaUztErFv2Z6DqQCcmQ0vB3VaFECl0OV/y61nNItAc62SBnxek2P7ml69DyYvAMCEakHAN0fG2qTFsDtrWVnZK2a3io0JQ+PG1y49ES1F0gfb3PSM2Cs5OZqRt/fX5HoPBYMbr4HhJl8YDrtoYkU0uE+V01s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=tenstorrent.com; spf=pass smtp.mailfrom=tenstorrent.com; dkim=pass (2048-bit key) header.d=tenstorrent.com header.i=@tenstorrent.com header.b=Pg2VNCf6; arc=none smtp.client-ip=209.85.167.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=tenstorrent.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tenstorrent.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tenstorrent.com header.i=@tenstorrent.com header.b="Pg2VNCf6" Received: by mail-oi1-f174.google.com with SMTP id 5614622812f47-3df08d53820so2657479b6e.0 for ; Mon, 02 Sep 2024 21:08:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tenstorrent.com; s=google; t=1725336538; x=1725941338; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=J/oLJOaGdN8OJwPD6NoJC1cI8myFT/cKMaiS1JkV6LQ=; b=Pg2VNCf6FZWxK32xsBNPiUlm56gpjT8sq82A0gaab9kXBU3vQ5xlL0f0tzGxq7YSxl G0ZoXWxlvzPWH+SDuomlgj3I212F45KTfngcRiWqDe22vcHMt5Yj2ukF4Ietdw/aJy+d Bty0X3YPVXyC/6kbH8mmk8fUfdCmtJIMpVad4/5fw7rIT9zEXIF9Za63VHRX+8Ag248W WD4QdH7UClkCzBxngrpfAeo4dGu25p2GA8KOlYcFlKyJMeMTFembIq0QOZupTKJ327eV SHdhVvd+TU4CJ2mYZBPp4SfxmV+72aDRtIBGFM78FHKVBiYFZYBDbqNSwYIE/W+jcpqN ZQQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725336538; x=1725941338; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=J/oLJOaGdN8OJwPD6NoJC1cI8myFT/cKMaiS1JkV6LQ=; b=iDFMhsnFPq/KejDJyLgU7C/6ofNxhgn68+1W3sLEh4xdeR1VP071fO2Va8cWnQWEVG MjK8ESWRT6kTJvzs8uAfmppDdYgcex8F4sg2+FIQUiseF/MrTjWpdGl+YDUtOKxgiNhw XUMNt5IpGX/0/AlnDEBXZc+QqnoRZQI8kf7yVl1zMPxpYrZ9sHLDGDmVbjNSP1VnhL+U FE2C9arBjVT3vE/55dRD6pdhYPORPMsxjx5Mo6C8F4IcuNxEOfwEI+ysCrSZG7VFgUQ5 YornYtwzoWDhoijUyBfln9ooMr1b1cPeT0SOLmGFp+mE8wN9TJ0EcolRCk9PNE4kfmyO Q5qQ== X-Forwarded-Encrypted: i=1; AJvYcCU3OnmSTcNyYgxEXui2QeJum++AOdaOFwk/TZelwlv7IW7mdGh/d6KxiT6pmT9KS0IX7umE1qd9yzud@vger.kernel.org X-Gm-Message-State: AOJu0YyJ0x0GBnLGR240Mgo07N9H+aZXXtFKfrBO2gzIizn2n1xv+ugK Ey1+ykzZb/Frvyscfp7tGBDJLuvaRxZsZ1znUsZ44eeSigH+H0o300Kdr+crsTA= X-Google-Smtp-Source: AGHT+IF4Vcbt1Npkx/U99wloObm9G5U1BlPYaDyyX/50VU3RDtGSJuZqS+ffOtv1ZRWb0VgYf78IAg== X-Received: by 2002:a05:6808:2f15:b0:3da:ab89:a805 with SMTP id 5614622812f47-3df1c0cb8a9mr14135311b6e.16.1725336538055; Mon, 02 Sep 2024 21:08:58 -0700 (PDT) Received: from [127.0.1.1] (75-164-215-68.ptld.qwest.net. [75.164.215.68]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-715e569ef39sm7532701b3a.122.2024.09.02.21.08.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Sep 2024 21:08:57 -0700 (PDT) From: Drew Fustini Date: Mon, 02 Sep 2024 21:06:59 -0700 Subject: [PATCH 6/8] riscv: dts: thead: Add Lichee Pi 4M GPIO line names Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240902-th1520-pinctrl-v1-6-639bf83ef50a@tenstorrent.com> References: <20240902-th1520-pinctrl-v1-0-639bf83ef50a@tenstorrent.com> In-Reply-To: <20240902-th1520-pinctrl-v1-0-639bf83ef50a@tenstorrent.com> To: Drew Fustini , Guo Ren , Fu Wei , Linus Walleij , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Emil Renner Berthing , Thomas Bonnefille , Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: linux-riscv@lists.infradead.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Drew Fustini X-Mailer: b4 0.14.1 From: Emil Renner Berthing Add names for the GPIO00-GPIO14 lines of the SO-DIMM module. Tested-by: Thomas Bonnefille Signed-off-by: Emil Renner Berthing Signed-off-by: Drew Fustini --- .../boot/dts/thead/th1520-lichee-module-4a.dtsi | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi b/arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi index 530648ad64f6..276f7e8a2c9b 100644 --- a/arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi +++ b/arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi @@ -41,6 +41,12 @@ &uart_sclk { clock-frequency = <100000000>; }; +&aogpio { + gpio-line-names = "", "", "", + "GPIO00", + "GPIO04"; +}; + &dmac0 { status = "okay"; }; @@ -60,3 +66,36 @@ &sdio0 { max-frequency = <198000000>; status = "okay"; }; + +&gpio0 { + gpio-line-names = "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", + "GPIO07", + "GPIO08", + "", + "GPIO01", + "GPIO02"; +}; + +&gpio1 { + gpio-line-names = "", "", "", + "GPIO11", + "GPIO12", + "GPIO13", + "GPIO14", + "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", + "GPIO06"; +}; + +&gpio2 { + gpio-line-names = "GPIO03", + "GPIO05"; +}; + +&gpio3 { + gpio-line-names = "", "", + "GPIO09", + "GPIO10"; +}; From patchwork Tue Sep 3 04:07:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Drew Fustini X-Patchwork-Id: 825072 Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) (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 DC4AD1CFEA2 for ; Tue, 3 Sep 2024 04:09:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725336544; cv=none; b=dK2PiuwwHLPU+LX7E7qZdczZiaSkqTxPN4Z1xeXX1kS96Ng54bELp8OXXbRaB0i0yTmHtAKXhWHIFNjK9HkApDjDASxcnQsuwHiLWQZUB136ZYj4oGDy8jQe203+nIO8H7rOBDlFPQ1eR7ouTlRtbGjiQ4i036EFEIy2bXL7ZsA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725336544; c=relaxed/simple; bh=RHt/CuEImmNnG/8VOU+K/H1jEiWMV+ZSHNrD1hvj2cM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=H5sesULSjS7EMtM+cRmjfNuSRztlwVjEBLFRuXQT7ZCedD9n6Rf8E3IiJ5bSa5hCFpNwfdbE/GwweB0Gi1cKQzDijJAONFV8p+qeiQ50voxJmtX+wXdWMpfoMIgu2fcUHp0pAKk8Qz2xiDlOmUAGLO5Q/tqUG1ieKz4h1LDX9CE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=tenstorrent.com; spf=pass smtp.mailfrom=tenstorrent.com; dkim=pass (2048-bit key) header.d=tenstorrent.com header.i=@tenstorrent.com header.b=QlxIqLsU; arc=none smtp.client-ip=209.85.210.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=tenstorrent.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tenstorrent.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tenstorrent.com header.i=@tenstorrent.com header.b="QlxIqLsU" Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-7176645e440so588691b3a.1 for ; Mon, 02 Sep 2024 21:09:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tenstorrent.com; s=google; t=1725336540; x=1725941340; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Nq2qwoQ8fGvyakSE32KyqUjWPDGD9IAug2eijzHwHho=; b=QlxIqLsUH6+bkGib+E9QLsSxwmXOIpaJ95LP7gE5p1cWppYbLPHSL5vcd/VGqZbuFo Y3Zff6ddfU0IHWSBuodFMQfIongdKTay+Saxo9mJ8uIoGGl1BmL5FV1LqBue75BAh6ST x+ozh3Lw6CVc9lQ3v9I1ovKUPTUBfWD2xWjfT4n5VL5Cpy0ZVawRlS1Kv0x1vz6FCOYJ oFl18hqVMMGUDLnx6KsuvmqjLkU8h7cN1jpEouobK1oyEG1ALZBnEpn+8bU8UNkmUxqC nPeVlhyEzdpRr0K2OV5IdLZgcPjcYJxorvIX7S16m2qi+kYXILTi9jTnK6/zV3XgOjhz 8VGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725336540; x=1725941340; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Nq2qwoQ8fGvyakSE32KyqUjWPDGD9IAug2eijzHwHho=; b=d5MsxfHx2GNXBQCOWu35SbSJgnMXJIaMf9Nj0PNNSCX1CoYQkTI4hA5xsizNSqXV5o Js5lnYW+tC1rd6rWQO9mLFiJJvQVgurgqPRolPVS18tekYHiEl/APD7BlxCAYKkymttI VbHm4TrSwl5rMPJcXrvvdBGaVSU+ieNfQIorkcMaS/9NSHln5GAUAa0RcunqKwc0NVAE wXjpfDYTU2MxHDE75qmO5GWtRE+LA/3YVYphs3l+O/jC5YDnOP24zEI1KY5LOjKDCsky O08JnEaRXXl5vjefjeP6E7AUG4uI2DHW5jDsZIIqAWTmhxXs0F/iBagt461xSvGwOMNc LUMA== X-Forwarded-Encrypted: i=1; AJvYcCW1c6m/dC/o8mskD2SGDVC8io2ukD6xDrHUYFUuTzDJFSeC5zczRFZKzM+MMYkO5lSnSDJC8NxRIpLq@vger.kernel.org X-Gm-Message-State: AOJu0Yy0kfcu7f+Yu/C66xeYluprZXXc9Ondqzb0UkcrUYv2IErd1a9A Uk9ZDZ+ZaooH43ZnCqBV0WFzAPNQmGkg7my/giqtj4fssDMJOrztxVNmJ941opE= X-Google-Smtp-Source: AGHT+IFNAPzS6NfqW5WUiKK6YWRUIPCTsa89ov5gA3kZvZyE5KG2NssyQ0TR5AepdwMXQxdhjgwENQ== X-Received: by 2002:a05:6a00:2d1c:b0:70d:26cd:9741 with SMTP id d2e1a72fcca58-7170a85aaafmr19264523b3a.12.1725336540085; Mon, 02 Sep 2024 21:09:00 -0700 (PDT) Received: from [127.0.1.1] (75-164-215-68.ptld.qwest.net. [75.164.215.68]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-715e569ef39sm7532701b3a.122.2024.09.02.21.08.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Sep 2024 21:08:59 -0700 (PDT) From: Drew Fustini Date: Mon, 02 Sep 2024 21:07:01 -0700 Subject: [PATCH 8/8] riscv: dtb: thead: Add BeagleV Ahead LEDs Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240902-th1520-pinctrl-v1-8-639bf83ef50a@tenstorrent.com> References: <20240902-th1520-pinctrl-v1-0-639bf83ef50a@tenstorrent.com> In-Reply-To: <20240902-th1520-pinctrl-v1-0-639bf83ef50a@tenstorrent.com> To: Drew Fustini , Guo Ren , Fu Wei , Linus Walleij , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Emil Renner Berthing , Thomas Bonnefille , Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: linux-riscv@lists.infradead.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Drew Fustini X-Mailer: b4 0.14.1 From: Emil Renner Berthing Add nodes for the 5 user controllable LEDs on the BeagleV Ahead board. Tested-by: Thomas Bonnefille Signed-off-by: Emil Renner Berthing Signed-off-by: Drew Fustini --- arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts b/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts index c5356f674f85..823aa5b44efb 100644 --- a/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts +++ b/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts @@ -7,6 +7,8 @@ /dts-v1/; #include "th1520.dtsi" +#include +#include / { model = "BeagleV Ahead"; @@ -34,7 +36,42 @@ chosen { memory@0 { device_type = "memory"; reg = <0x0 0x00000000 0x1 0x00000000>; + }; + + leds { + pinctrl-names = "default"; + pinctrl-0 = <&led_pins>; + compatible = "gpio-leds"; + + led-1 { + gpios = <&gpio4 8 GPIO_ACTIVE_LOW>; + color = ; + label = "led1"; + }; + + led-2 { + gpios = <&gpio4 9 GPIO_ACTIVE_LOW>; + color = ; + label = "led2"; + }; + + led-3 { + gpios = <&gpio4 10 GPIO_ACTIVE_LOW>; + color = ; + label = "led3"; + }; + + led-4 { + gpios = <&gpio4 11 GPIO_ACTIVE_LOW>; + color = ; + label = "led4"; + }; + led-5 { + gpios = <&gpio4 12 GPIO_ACTIVE_LOW>; + color = ; + label = "led5"; + }; }; }; @@ -82,6 +119,24 @@ &sdio0 { status = "okay"; }; +&padctrl_aosys { + led_pins: led-0 { + led-pins { + pins = "AUDIO_PA8", /* GPIO4_8 */ + "AUDIO_PA9", /* GPIO4_9 */ + "AUDIO_PA10", /* GPIO4_10 */ + "AUDIO_PA11", /* GPIO4_11 */ + "AUDIO_PA12"; /* GPIO4_12 */ + function = "gpio"; + bias-disable; + drive-strength = <3>; + input-disable; + input-schmitt-disable; + slew-rate = <0>; + }; + }; +}; + &padctrl0_apsys { uart0_pins: uart0-0 { tx-pins {