Linux-RISC-V Archive mirror
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 5.15 24/29] riscv: dts: sifive unmatched: Name gpio lines
       [not found] <20211221015751.116328-1-sashal@kernel.org>
@ 2021-12-21  1:57 ` Sasha Levin
  2021-12-21  1:57 ` [PATCH AUTOSEL 5.15 25/29] riscv: dts: sifive unmatched: Expose the board ID eeprom Sasha Levin
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2021-12-21  1:57 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Vincent Pelletier, Palmer Dabbelt, Sasha Levin, robh+dt,
	paul.walmsley, palmer, aou, qiuwenbo, yash.shah, devicetree,
	linux-riscv

From: Vincent Pelletier <plr.vincent@gmail.com>

[ Upstream commit ea81b91e4e256b0bb75d47ad3a5c230b2171a005 ]

Follow the pin descriptions given in the version 3 of the board schematics.

Signed-off-by: Vincent Pelletier <plr.vincent@gmail.com>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts b/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
index 2e4ea84f27e77..a788b99638af8 100644
--- a/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
+++ b/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
@@ -250,4 +250,8 @@ &pwm1 {
 
 &gpio {
 	status = "okay";
+	gpio-line-names = "J29.1", "PMICNTB", "PMICSHDN", "J8.1", "J8.3",
+		"PCIe_PWREN", "THERM", "UBRDG_RSTN", "PCIe_PERSTN",
+		"ULPI_RSTN", "J8.2", "UHUB_RSTN", "GEMGXL_RST", "J8.4",
+		"EN_VDD_SD", "SD_CD";
 };
-- 
2.34.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH AUTOSEL 5.15 25/29] riscv: dts: sifive unmatched: Expose the board ID eeprom
       [not found] <20211221015751.116328-1-sashal@kernel.org>
  2021-12-21  1:57 ` [PATCH AUTOSEL 5.15 24/29] riscv: dts: sifive unmatched: Name gpio lines Sasha Levin
@ 2021-12-21  1:57 ` Sasha Levin
  2021-12-21  1:57 ` [PATCH AUTOSEL 5.15 26/29] riscv: dts: sifive unmatched: Expose the PMIC sub-functions Sasha Levin
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2021-12-21  1:57 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Vincent Pelletier, Palmer Dabbelt, Sasha Levin, robh+dt,
	paul.walmsley, palmer, aou, qiuwenbo, yash.shah, devicetree,
	linux-riscv

From: Vincent Pelletier <plr.vincent@gmail.com>

[ Upstream commit 8120393b74b31bbaf293f59896de6b0d50febc48 ]

Mark it as read-only as it is factory-programmed with identifying
information, and no executable nor configuration:
- eth MAC address
- board model (PCB version, BoM version)
- board serial number
Accidental modification would cause misidentification which could brick
the board, so marking read-only seem like both a safe and non-constraining
choice.

Signed-off-by: Vincent Pelletier <plr.vincent@gmail.com>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts b/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
index a788b99638af8..7ea1c8da5fb2e 100644
--- a/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
+++ b/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
@@ -63,6 +63,16 @@ temperature-sensor@4c {
 		interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
 	};
 
+	eeprom@54 {
+		compatible = "microchip,24c02", "atmel,24c02";
+		reg = <0x54>;
+		vcc-supply = <&vdd_bpro>;
+		label = "board-id";
+		pagesize = <16>;
+		read-only;
+		size = <256>;
+	};
+
 	pmic@58 {
 		compatible = "dlg,da9063";
 		reg = <0x58>;
-- 
2.34.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH AUTOSEL 5.15 26/29] riscv: dts: sifive unmatched: Expose the PMIC sub-functions
       [not found] <20211221015751.116328-1-sashal@kernel.org>
  2021-12-21  1:57 ` [PATCH AUTOSEL 5.15 24/29] riscv: dts: sifive unmatched: Name gpio lines Sasha Levin
  2021-12-21  1:57 ` [PATCH AUTOSEL 5.15 25/29] riscv: dts: sifive unmatched: Expose the board ID eeprom Sasha Levin
@ 2021-12-21  1:57 ` Sasha Levin
  2021-12-21  1:57 ` [PATCH AUTOSEL 5.15 27/29] riscv: dts: sifive unmatched: Fix regulator for board rev3 Sasha Levin
  2021-12-21  1:57 ` [PATCH AUTOSEL 5.15 28/29] riscv: dts: sifive unmatched: Link the tmp451 with its power supply Sasha Levin
  4 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2021-12-21  1:57 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Vincent Pelletier, Palmer Dabbelt, Sasha Levin, robh+dt, palmer,
	paul.walmsley, aou, qiuwenbo, yash.shah, devicetree, linux-riscv

From: Vincent Pelletier <plr.vincent@gmail.com>

[ Upstream commit cd29cc8ad2540a4f9a0a3e174394d39e648ef941 ]

These sub-functions are available in the chip revision on this board, so
expose them.

Signed-off-by: Vincent Pelletier <plr.vincent@gmail.com>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts b/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
index 7ea1c8da5fb2e..dd110ba00e871 100644
--- a/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
+++ b/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
@@ -80,6 +80,18 @@ pmic@58 {
 		interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
 		interrupt-controller;
 
+		onkey {
+			compatible = "dlg,da9063-onkey";
+		};
+
+		rtc {
+			compatible = "dlg,da9063-rtc";
+		};
+
+		wdt {
+			compatible = "dlg,da9063-watchdog";
+		};
+
 		regulators {
 			vdd_bcore1: bcore1 {
 				regulator-min-microvolt = <900000>;
-- 
2.34.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH AUTOSEL 5.15 27/29] riscv: dts: sifive unmatched: Fix regulator for board rev3
       [not found] <20211221015751.116328-1-sashal@kernel.org>
                   ` (2 preceding siblings ...)
  2021-12-21  1:57 ` [PATCH AUTOSEL 5.15 26/29] riscv: dts: sifive unmatched: Expose the PMIC sub-functions Sasha Levin
@ 2021-12-21  1:57 ` Sasha Levin
  2021-12-21  1:57 ` [PATCH AUTOSEL 5.15 28/29] riscv: dts: sifive unmatched: Link the tmp451 with its power supply Sasha Levin
  4 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2021-12-21  1:57 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Vincent Pelletier, Palmer Dabbelt, Sasha Levin, robh+dt,
	paul.walmsley, palmer, aou, qiuwenbo, yash.shah, devicetree,
	linux-riscv

From: Vincent Pelletier <plr.vincent@gmail.com>

[ Upstream commit ad931d9b3b2e21586de8e6b34346d0a30c13721d ]

The existing values are rejected by the da9063 regulator driver, as they
are unachievable with the declared chip setup (non-merged vcore and bmem
are unable to provide the declared curent).

Fix voltages to match rev3 schematics, which also matches their boot-up
configuration within the chip's available precision.
Declare bcore1/bcore2 and bmem/bio as merged.
Set ldo09 and ldo10 as always-on as their consumers are not declared but
exist.
Drop ldo current limits as there is no current limit feature for these
regulators in the DA9063. Fixes warnings like:
  DA9063_LDO3: Operation of current configuration missing

Signed-off-by: Vincent Pelletier <plr.vincent@gmail.com>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 .../boot/dts/sifive/hifive-unmatched-a00.dts  | 84 ++++++-------------
 1 file changed, 24 insertions(+), 60 deletions(-)

diff --git a/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts b/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
index dd110ba00e871..09d9342282339 100644
--- a/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
+++ b/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
@@ -93,47 +93,31 @@ wdt {
 		};
 
 		regulators {
-			vdd_bcore1: bcore1 {
-				regulator-min-microvolt = <900000>;
-				regulator-max-microvolt = <900000>;
-				regulator-min-microamp = <5000000>;
-				regulator-max-microamp = <5000000>;
-				regulator-always-on;
-			};
-
-			vdd_bcore2: bcore2 {
-				regulator-min-microvolt = <900000>;
-				regulator-max-microvolt = <900000>;
-				regulator-min-microamp = <5000000>;
-				regulator-max-microamp = <5000000>;
+			vdd_bcore: bcores-merged {
+				regulator-min-microvolt = <1050000>;
+				regulator-max-microvolt = <1050000>;
+				regulator-min-microamp = <4800000>;
+				regulator-max-microamp = <4800000>;
 				regulator-always-on;
 			};
 
 			vdd_bpro: bpro {
 				regulator-min-microvolt = <1800000>;
 				regulator-max-microvolt = <1800000>;
-				regulator-min-microamp = <2500000>;
-				regulator-max-microamp = <2500000>;
+				regulator-min-microamp = <2400000>;
+				regulator-max-microamp = <2400000>;
 				regulator-always-on;
 			};
 
 			vdd_bperi: bperi {
-				regulator-min-microvolt = <1050000>;
-				regulator-max-microvolt = <1050000>;
+				regulator-min-microvolt = <1060000>;
+				regulator-max-microvolt = <1060000>;
 				regulator-min-microamp = <1500000>;
 				regulator-max-microamp = <1500000>;
 				regulator-always-on;
 			};
 
-			vdd_bmem: bmem {
-				regulator-min-microvolt = <1200000>;
-				regulator-max-microvolt = <1200000>;
-				regulator-min-microamp = <3000000>;
-				regulator-max-microamp = <3000000>;
-				regulator-always-on;
-			};
-
-			vdd_bio: bio {
+			vdd_bmem_bio: bmem-bio-merged {
 				regulator-min-microvolt = <1200000>;
 				regulator-max-microvolt = <1200000>;
 				regulator-min-microamp = <3000000>;
@@ -144,86 +128,66 @@ vdd_bio: bio {
 			vdd_ldo1: ldo1 {
 				regulator-min-microvolt = <1800000>;
 				regulator-max-microvolt = <1800000>;
-				regulator-min-microamp = <100000>;
-				regulator-max-microamp = <100000>;
 				regulator-always-on;
 			};
 
 			vdd_ldo2: ldo2 {
 				regulator-min-microvolt = <1800000>;
 				regulator-max-microvolt = <1800000>;
-				regulator-min-microamp = <200000>;
-				regulator-max-microamp = <200000>;
 				regulator-always-on;
 			};
 
 			vdd_ldo3: ldo3 {
-				regulator-min-microvolt = <1800000>;
-				regulator-max-microvolt = <1800000>;
-				regulator-min-microamp = <200000>;
-				regulator-max-microamp = <200000>;
+				regulator-min-microvolt = <3300000>;
+				regulator-max-microvolt = <3300000>;
 				regulator-always-on;
 			};
 
 			vdd_ldo4: ldo4 {
-				regulator-min-microvolt = <1800000>;
-				regulator-max-microvolt = <1800000>;
-				regulator-min-microamp = <200000>;
-				regulator-max-microamp = <200000>;
+				regulator-min-microvolt = <2500000>;
+				regulator-max-microvolt = <2500000>;
 				regulator-always-on;
 			};
 
 			vdd_ldo5: ldo5 {
-				regulator-min-microvolt = <1800000>;
-				regulator-max-microvolt = <1800000>;
-				regulator-min-microamp = <100000>;
-				regulator-max-microamp = <100000>;
+				regulator-min-microvolt = <3300000>;
+				regulator-max-microvolt = <3300000>;
 				regulator-always-on;
 			};
 
 			vdd_ldo6: ldo6 {
-				regulator-min-microvolt = <3300000>;
-				regulator-max-microvolt = <3300000>;
-				regulator-min-microamp = <200000>;
-				regulator-max-microamp = <200000>;
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
 				regulator-always-on;
 			};
 
 			vdd_ldo7: ldo7 {
-				regulator-min-microvolt = <1800000>;
-				regulator-max-microvolt = <1800000>;
-				regulator-min-microamp = <200000>;
-				regulator-max-microamp = <200000>;
+				regulator-min-microvolt = <3300000>;
+				regulator-max-microvolt = <3300000>;
 				regulator-always-on;
 			};
 
 			vdd_ldo8: ldo8 {
-				regulator-min-microvolt = <1800000>;
-				regulator-max-microvolt = <1800000>;
-				regulator-min-microamp = <200000>;
-				regulator-max-microamp = <200000>;
+				regulator-min-microvolt = <3300000>;
+				regulator-max-microvolt = <3300000>;
 				regulator-always-on;
 			};
 
 			vdd_ld09: ldo9 {
 				regulator-min-microvolt = <1050000>;
 				regulator-max-microvolt = <1050000>;
-				regulator-min-microamp = <200000>;
-				regulator-max-microamp = <200000>;
+				regulator-always-on;
 			};
 
 			vdd_ldo10: ldo10 {
 				regulator-min-microvolt = <1000000>;
 				regulator-max-microvolt = <1000000>;
-				regulator-min-microamp = <300000>;
-				regulator-max-microamp = <300000>;
+				regulator-always-on;
 			};
 
 			vdd_ldo11: ldo11 {
 				regulator-min-microvolt = <2500000>;
 				regulator-max-microvolt = <2500000>;
-				regulator-min-microamp = <300000>;
-				regulator-max-microamp = <300000>;
 				regulator-always-on;
 			};
 		};
-- 
2.34.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH AUTOSEL 5.15 28/29] riscv: dts: sifive unmatched: Link the tmp451 with its power supply
       [not found] <20211221015751.116328-1-sashal@kernel.org>
                   ` (3 preceding siblings ...)
  2021-12-21  1:57 ` [PATCH AUTOSEL 5.15 27/29] riscv: dts: sifive unmatched: Fix regulator for board rev3 Sasha Levin
@ 2021-12-21  1:57 ` Sasha Levin
  4 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2021-12-21  1:57 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Vincent Pelletier, Palmer Dabbelt, Sasha Levin, robh+dt,
	paul.walmsley, palmer, aou, qiuwenbo, yash.shah, devicetree,
	linux-riscv

From: Vincent Pelletier <plr.vincent@gmail.com>

[ Upstream commit f6f7fbb89bf8dc9132fde55cfe67483138eea880 ]

Fixes the following probe warning:
  lm90 0-004c: Looking up vcc-supply from device tree
  lm90 0-004c: Looking up vcc-supply property in node /soc/i2c@10030000/temperature-sensor@4c failed
  lm90 0-004c: supply vcc not found, using dummy regulator

Signed-off-by: Vincent Pelletier <plr.vincent@gmail.com>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts b/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
index 09d9342282339..0c4a508869059 100644
--- a/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
+++ b/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
@@ -59,6 +59,7 @@ &i2c0 {
 	temperature-sensor@4c {
 		compatible = "ti,tmp451";
 		reg = <0x4c>;
+		vcc-supply = <&vdd_bpro>;
 		interrupt-parent = <&gpio>;
 		interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
 	};
-- 
2.34.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-12-21  1:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20211221015751.116328-1-sashal@kernel.org>
2021-12-21  1:57 ` [PATCH AUTOSEL 5.15 24/29] riscv: dts: sifive unmatched: Name gpio lines Sasha Levin
2021-12-21  1:57 ` [PATCH AUTOSEL 5.15 25/29] riscv: dts: sifive unmatched: Expose the board ID eeprom Sasha Levin
2021-12-21  1:57 ` [PATCH AUTOSEL 5.15 26/29] riscv: dts: sifive unmatched: Expose the PMIC sub-functions Sasha Levin
2021-12-21  1:57 ` [PATCH AUTOSEL 5.15 27/29] riscv: dts: sifive unmatched: Fix regulator for board rev3 Sasha Levin
2021-12-21  1:57 ` [PATCH AUTOSEL 5.15 28/29] riscv: dts: sifive unmatched: Link the tmp451 with its power supply Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).