devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] riscv: dts: nezha-d1: add gpio-line-names
@ 2023-02-08  1:45 Trevor Woerner
  2023-02-08 16:43 ` Conor Dooley
  0 siblings, 1 reply; 12+ messages in thread
From: Trevor Woerner @ 2023-02-08  1:45 UTC (permalink / raw)
  To: linux-kernel, Conor Dooley, Rob Herring, Krzysztof Kozlowski,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland
  Cc: linux-riscv, devicetree, linux-arm-kernel, linux-sunxi

Add descriptive names so users can associate specific lines with their
respective pins on the 40-pin header according to the schematics found at:

	http://dl.linux-sunxi.org/D1/D1_Nezha_development_board_schematic_diagram_20210224.pdf

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
 .../boot/dts/allwinner/sun20i-d1-nezha.dts    | 53 +++++++++++++++++++
 1 file changed, 53 insertions(+)

diff --git a/arch/riscv/boot/dts/allwinner/sun20i-d1-nezha.dts b/arch/riscv/boot/dts/allwinner/sun20i-d1-nezha.dts
index a0769185be97..33489c7619cb 100644
--- a/arch/riscv/boot/dts/allwinner/sun20i-d1-nezha.dts
+++ b/arch/riscv/boot/dts/allwinner/sun20i-d1-nezha.dts
@@ -90,6 +90,15 @@ pcf8574a: gpio@38 {
 		gpio-controller;
 		#gpio-cells = <2>;
 		#interrupt-cells = <2>;
+		gpio-line-names =
+			"pin13 [PP0,gpio8] ",
+			"pin16 [PP1,gpio10]",
+			"pin18 [PP2,gpio11]",
+			"pin26 [PP3,gpio17]",
+			"pin22 [PP4,gpio14]",
+			"pin28 [PP5,gpio19]",
+			"pin37 [PP6,gpio23]",
+			"pin11 [PP7,gpio6] ";
 	};
 };
 
@@ -164,3 +173,47 @@ &usbphy {
 	usb1_vbus-supply = <&reg_vcc>;
 	status = "okay";
 };
+
+&pio {
+	gpio-line-names =
+		/* Port A */
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* Port B */
+		"pin5  [PB0, gpio2/twi2-sck]",
+		"pin3  [PB1, gpio1/twi2-sda]",
+		"",
+		"pin38 [PB3, gpio24/i2s2-din]",
+		"pin40 [PB4, gpio25/i2s2-dout]",
+		"pin12 [PB5, gpio7/i2s-clk]",
+		"pin35 [PB6, gpio22/i2s2-lrck]",
+		"",
+		"pin8  [PB8, gpio4/uart0-txd]",
+		"pin10 [PB9, gpio5/uart0-rxd]",
+		"",
+		"",
+		"pin15 [PB12,gpio9]",
+		"", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* Port C */
+		"",
+		"pin31 [PC1, gpio21]",
+		"", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "",
+		/* Port D */
+		"", "", "", "", "", "", "", "",
+		"", "",
+		"pin24 [PD10,gpio16/spi1-ce0]",
+		"pin23 [PD11,gpio15/spi1-clk]",
+		"pin19 [PD12,gpio12/spi1-mosi]",
+		"pin21 [PD13,gpio13/spi1-miso]",
+		"pin27 [PD14,gpio18/spi1-hold]",
+		"pin29 [PD15,gpio20/spi1-wp]",
+		"", "", "", "", "", "",
+		"pin7  [PD22,gpio3/pwm]";
+};
-- 
2.36.0.rc2.17.g4027e30c53


^ permalink raw reply related	[flat|nested] 12+ messages in thread
* [PATCH 1/2] dt-bindings: gpio: nxp,pcf8575: add gpio-line-names
@ 2023-02-09  4:17 Trevor Woerner
  2023-02-09  4:31 ` [PATCH v2] " Trevor Woerner
  0 siblings, 1 reply; 12+ messages in thread
From: Trevor Woerner @ 2023-02-09  4:17 UTC (permalink / raw)
  To: linux-kernel, Linus Walleij, Bartosz Golaszewski, Rob Herring,
	Krzysztof Kozlowski, Laurent Pinchart
  Cc: linux-gpio, devicetree

The family of PCF857x-compatible chips describe 8-bit i2c i/o expanders.
Allow the user to specify names for the 8 gpio lines.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
 Documentation/devicetree/bindings/gpio/nxp,pcf8575.yaml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/gpio/nxp,pcf8575.yaml b/Documentation/devicetree/bindings/gpio/nxp,pcf8575.yaml
index f0ff66c4c74e..81b825a4353c 100644
--- a/Documentation/devicetree/bindings/gpio/nxp,pcf8575.yaml
+++ b/Documentation/devicetree/bindings/gpio/nxp,pcf8575.yaml
@@ -39,6 +39,10 @@ properties:
   reg:
     maxItems: 1
 
+  gpio-line-names:
+    minItems: 1
+    maxItems: 8
+
   gpio-controller: true
 
   '#gpio-cells':
-- 
2.36.0.rc2.17.g4027e30c53


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

end of thread, other threads:[~2023-03-14 20:44 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-08  1:45 [PATCH] riscv: dts: nezha-d1: add gpio-line-names Trevor Woerner
2023-02-08 16:43 ` Conor Dooley
2023-02-08 16:57   ` Trevor Woerner
2023-02-10  2:51     ` [PATCH v3 2/2] " Trevor Woerner
2023-02-10 20:37       ` Conor Dooley
2023-03-14 20:44       ` Jernej Škrabec
  -- strict thread matches above, loose matches on Subject: below --
2023-02-09  4:17 [PATCH 1/2] dt-bindings: gpio: nxp,pcf8575: " Trevor Woerner
2023-02-09  4:31 ` [PATCH v2] " Trevor Woerner
2023-02-09  8:29   ` Krzysztof Kozlowski
2023-02-10  2:51     ` [PATCH v3 1/2] " Trevor Woerner
2023-02-10 11:49       ` Krzysztof Kozlowski
2023-02-27 21:37       ` Linus Walleij

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 NNTP newsgroup(s).