From ae2c6e6ed6be2931193721099cb32b137eb7f6d7 Mon Sep 17 00:00:00 2001
From: Richard Zink <richard@familie-zink.org>
Date: Mon, 10 Mar 2025 15:10:43 +0100
Subject: [PATCH] Cleaned SD card schematic

---
 hardware/mainboard/16_SDCard.kicad_sch | 359 +++++--------------------
 hardware/mainboard/mainboard.kicad_sch |  88 +++++-
 2 files changed, 154 insertions(+), 293 deletions(-)

diff --git a/hardware/mainboard/16_SDCard.kicad_sch b/hardware/mainboard/16_SDCard.kicad_sch
index 89cd2dc..09b407f 100644
--- a/hardware/mainboard/16_SDCard.kicad_sch
+++ b/hardware/mainboard/16_SDCard.kicad_sch
@@ -790,107 +790,6 @@
 			)
 			(embedded_fonts no)
 		)
-		(symbol "mainboard:Power-VCC"
-			(power)
-			(pin_numbers
-				(hide yes)
-			)
-			(pin_names
-				(hide yes)
-			)
-			(exclude_from_sim no)
-			(in_bom yes)
-			(on_board yes)
-			(property "Reference" "#PWR"
-				(at 0 0 0)
-				(effects
-					(font
-						(size 1.27 1.27)
-					)
-					(hide yes)
-				)
-			)
-			(property "Value" "VCC"
-				(at 0 5.08 0)
-				(effects
-					(font
-						(size 1.27 1.27)
-					)
-				)
-			)
-			(property "Footprint" "mainboard:"
-				(at 0 0 0)
-				(effects
-					(font
-						(size 1.27 1.27)
-					)
-					(hide yes)
-				)
-			)
-			(property "Datasheet" ""
-				(at 0 0 0)
-				(effects
-					(font
-						(size 1.27 1.27)
-					)
-					(hide yes)
-				)
-			)
-			(property "Description" ""
-				(at 0 0 0)
-				(effects
-					(font
-						(size 1.27 1.27)
-					)
-					(hide yes)
-				)
-			)
-			(symbol "Power-VCC_1_0"
-				(polyline
-					(pts
-						(xy -2.54 3.81) (xy 2.54 3.81)
-					)
-					(stroke
-						(width 0)
-						(type default)
-					)
-					(fill
-						(type none)
-					)
-				)
-				(polyline
-					(pts
-						(xy 0 3.81) (xy 0 1.27)
-					)
-					(stroke
-						(width 0)
-						(type default)
-					)
-					(fill
-						(type none)
-					)
-				)
-				(pin power_in line
-					(at 0 0 90)
-					(length 1.27)
-					(name "VCC3V3_SD_S0"
-						(effects
-							(font
-								(size 1.27 1.27)
-							)
-						)
-					)
-					(number "1"
-						(effects
-							(font
-								(size 0.0254 0.0254)
-							)
-						)
-					)
-				)
-			)
-			(embedded_fonts no)
-		)
 		(symbol "mainboard:RC0402FR-0733RL"
 			(exclude_from_sim no)
 			(in_bom yes)
@@ -2394,127 +2293,18 @@
 		)
 		(uuid "fb1a9fb7-838b-4476-aa19-7996a807f3b6")
 	)
-	(global_label "SDMMC0_CMD"
+	(hierarchical_label "SDIO_PWR"
 		(shape input)
-		(at 43.18 119.38 180)
+		(at 34.29 80.01 90)
 		(effects
 			(font
 				(size 1.27 1.27)
 			)
-			(justify right)
-		)
-		(uuid "213a14b3-06a5-47c7-b2f6-8c11f6ea1769")
-		(property "Intersheetrefs" "${INTERSHEET_REFS}"
-			(at 43.18 119.38 0)
-			(effects
-				(font
-					(size 1.27 1.27)
-				)
-				(hide yes)
-			)
+			(justify left)
 		)
+		(uuid "1601ac2e-2c99-4b59-b816-7903b364c3d3")
 	)
-	(global_label "SDMMC0_D1"
-		(shape input)
-		(at 43.18 132.08 180)
-		(effects
-			(font
-				(size 1.27 1.27)
-			)
-			(justify right)
-		)
-		(uuid "64ad0d6d-e2fd-4de9-99a7-b982d8a9f484")
-		(property "Intersheetrefs" "${INTERSHEET_REFS}"
-			(at 43.18 132.08 0)
-			(effects
-				(font
-					(size 1.27 1.27)
-				)
-				(hide yes)
-			)
-		)
-	)
-	(global_label "SDMMC0_D3"
-		(shape input)
-		(at 43.18 116.84 180)
-		(effects
-			(font
-				(size 1.27 1.27)
-			)
-			(justify right)
-		)
-		(uuid "7743cc0e-0b0f-41b8-b12e-f253adbda493")
-		(property "Intersheetrefs" "${INTERSHEET_REFS}"
-			(at 43.18 116.84 0)
-			(effects
-				(font
-					(size 1.27 1.27)
-				)
-				(hide yes)
-			)
-		)
-	)
-	(global_label "SDMMC0_D2"
-		(shape input)
-		(at 43.18 114.3 180)
-		(effects
-			(font
-				(size 1.27 1.27)
-			)
-			(justify right)
-		)
-		(uuid "ad5f88ec-1c78-4765-87e7-b4bac0badaf0")
-		(property "Intersheetrefs" "${INTERSHEET_REFS}"
-			(at 43.18 114.3 0)
-			(effects
-				(font
-					(size 1.27 1.27)
-				)
-				(hide yes)
-			)
-		)
-	)
-	(global_label "SDMMC0_D0"
-		(shape input)
-		(at 43.18 129.54 180)
-		(effects
-			(font
-				(size 1.27 1.27)
-			)
-			(justify right)
-		)
-		(uuid "ad65e37d-a46d-4818-9e88-cb946e3dceee")
-		(property "Intersheetrefs" "${INTERSHEET_REFS}"
-			(at 43.18 129.54 0)
-			(effects
-				(font
-					(size 1.27 1.27)
-				)
-				(hide yes)
-			)
-		)
-	)
-	(global_label "SD_CLK"
-		(shape input)
-		(at 43.18 124.46 180)
-		(effects
-			(font
-				(size 1.27 1.27)
-			)
-			(justify right)
-		)
-		(uuid "aeff5f7f-f32f-4c75-94cd-74f0df9448e0")
-		(property "Intersheetrefs" "${INTERSHEET_REFS}"
-			(at 43.18 124.46 0)
-			(effects
-				(font
-					(size 1.27 1.27)
-				)
-				(hide yes)
-			)
-		)
-	)
-	(global_label "GPIO0_A4/SDMMC_DET_L"
+	(hierarchical_label "~{SDIO_DET}"
 		(shape input)
 		(at 43.18 134.62 180)
 		(effects
@@ -2523,16 +2313,73 @@
 			)
 			(justify right)
 		)
-		(uuid "f71c42aa-9769-40b2-818e-23e1d592c97d")
-		(property "Intersheetrefs" "${INTERSHEET_REFS}"
-			(at 43.18 134.62 0)
-			(effects
-				(font
-					(size 1.27 1.27)
-				)
-				(hide yes)
+		(uuid "25d58d71-1a53-4757-a2e7-9d8f7444d06f")
+	)
+	(hierarchical_label "SDIO_D3"
+		(shape input)
+		(at 43.18 116.84 180)
+		(effects
+			(font
+				(size 1.27 1.27)
 			)
+			(justify right)
 		)
+		(uuid "71a91164-6293-4ac3-8db9-f2a4e37675e6")
+	)
+	(hierarchical_label "SDIO_CMD"
+		(shape input)
+		(at 43.18 119.38 180)
+		(effects
+			(font
+				(size 1.27 1.27)
+			)
+			(justify right)
+		)
+		(uuid "824fd3c1-abac-4e75-870d-7fdf18c53696")
+	)
+	(hierarchical_label "SDIO_D1"
+		(shape input)
+		(at 43.18 132.08 180)
+		(effects
+			(font
+				(size 1.27 1.27)
+			)
+			(justify right)
+		)
+		(uuid "8a952613-6d28-4cc2-8fc3-510fc74553bb")
+	)
+	(hierarchical_label "SDIO_CLK"
+		(shape input)
+		(at 43.18 124.46 180)
+		(effects
+			(font
+				(size 1.27 1.27)
+			)
+			(justify right)
+		)
+		(uuid "a7c241fc-44ef-4a13-8c63-e080a46e015b")
+	)
+	(hierarchical_label "SDIO_D2"
+		(shape input)
+		(at 43.18 114.3 180)
+		(effects
+			(font
+				(size 1.27 1.27)
+			)
+			(justify right)
+		)
+		(uuid "abeee4e2-e70e-4b81-8b51-f62e34665575")
+	)
+	(hierarchical_label "SDIO_D0"
+		(shape input)
+		(at 43.18 129.54 180)
+		(effects
+			(font
+				(size 1.27 1.27)
+			)
+			(justify right)
+		)
+		(uuid "f9038cba-18e5-46dc-94c2-1d2053b60d40")
 	)
 	(symbol
 		(lib_id "mainboard:Ground-GND")
@@ -3828,72 +3675,6 @@
 			)
 		)
 	)
-	(symbol
-		(lib_id "mainboard:Power-VCC")
-		(at 34.29 80.01 0)
-		(unit 1)
-		(exclude_from_sim no)
-		(in_bom yes)
-		(on_board yes)
-		(dnp no)
-		(uuid "94172c06-1b78-429a-8873-7706716930e6")
-		(property "Reference" "#PWR01701"
-			(at 34.29 80.01 0)
-			(effects
-				(font
-					(size 1.27 1.27)
-				)
-				(hide yes)
-			)
-		)
-		(property "Value" "VCC3V3_SD_S0"
-			(at 34.29 74.93 0)
-			(effects
-				(font
-					(size 1.27 1.27)
-				)
-				(hide yes)
-			)
-		)
-		(property "Footprint" "mainboard:"
-			(at 34.29 80.01 0)
-			(effects
-				(font
-					(size 1.27 1.27)
-				)
-				(hide yes)
-			)
-		)
-		(property "Datasheet" ""
-			(at 34.29 80.01 0)
-			(effects
-				(font
-					(size 1.27 1.27)
-				)
-				(hide yes)
-			)
-		)
-		(property "Description" ""
-			(at 34.29 80.01 0)
-			(effects
-				(font
-					(size 1.27 1.27)
-				)
-				(hide yes)
-			)
-		)
-		(pin "1"
-			(uuid "5fd225de-5abf-4a7d-a0aa-dbdae75af980")
-		)
-		(instances
-			(project ""
-				(path "/e8df7ad4-0398-46fe-8df2-22f014c5f1dd/8986aa19-15b1-4e69-80f7-caad2369fd75"
-					(reference "#PWR01701")
-					(unit 1)
-				)
-			)
-		)
-	)
 	(symbol
 		(lib_id "mainboard:RC0402FR-0733RL")
 		(at 55.88 134.62 0)
diff --git a/hardware/mainboard/mainboard.kicad_sch b/hardware/mainboard/mainboard.kicad_sch
index 1791477..2d10323 100644
--- a/hardware/mainboard/mainboard.kicad_sch
+++ b/hardware/mainboard/mainboard.kicad_sch
@@ -520,8 +520,8 @@
 		)
 	)
 	(sheet
-		(at 35.56 214.63)
-		(size 12.7 3.81)
+		(at 228.6 228.6)
+		(size 25.4 25.4)
 		(exclude_from_sim no)
 		(in_bom yes)
 		(on_board yes)
@@ -536,7 +536,7 @@
 		)
 		(uuid "8986aa19-15b1-4e69-80f7-caad2369fd75")
 		(property "Sheetname" "SD Card Socket"
-			(at 35.56 213.9184 0)
+			(at 228.6 227.8884 0)
 			(effects
 				(font
 					(size 1.27 1.27)
@@ -545,7 +545,7 @@
 			)
 		)
 		(property "Sheetfile" "16_SDCard.kicad_sch"
-			(at 35.56 219.0246 0)
+			(at 228.6 254.5846 0)
 			(effects
 				(font
 					(size 1.27 1.27)
@@ -553,6 +553,86 @@
 				(justify left top)
 			)
 		)
+		(pin "SDIO_CLK" input
+			(at 228.6 251.46 180)
+			(uuid "5922c684-81ff-4ac7-a249-28de417cbd79")
+			(effects
+				(font
+					(size 1.27 1.27)
+				)
+				(justify left)
+			)
+		)
+		(pin "SDIO_CMD" input
+			(at 228.6 248.92 180)
+			(uuid "04798fc1-704d-412a-837b-ad01e756cde4")
+			(effects
+				(font
+					(size 1.27 1.27)
+				)
+				(justify left)
+			)
+		)
+		(pin "SDIO_D0" input
+			(at 228.6 246.38 180)
+			(uuid "98c40254-3c59-43b8-b396-350849a941eb")
+			(effects
+				(font
+					(size 1.27 1.27)
+				)
+				(justify left)
+			)
+		)
+		(pin "SDIO_D1" input
+			(at 228.6 243.84 180)
+			(uuid "b36ea8da-9488-4979-b292-96e7f3a85ce8")
+			(effects
+				(font
+					(size 1.27 1.27)
+				)
+				(justify left)
+			)
+		)
+		(pin "SDIO_D2" input
+			(at 228.6 241.3 180)
+			(uuid "25aba3a3-f141-4163-82f3-1534fbcd1254")
+			(effects
+				(font
+					(size 1.27 1.27)
+				)
+				(justify left)
+			)
+		)
+		(pin "SDIO_D3" input
+			(at 228.6 238.76 180)
+			(uuid "9e5ad54f-74b3-46dd-84b0-5f64f560da29")
+			(effects
+				(font
+					(size 1.27 1.27)
+				)
+				(justify left)
+			)
+		)
+		(pin "SDIO_PWR" input
+			(at 228.6 231.14 180)
+			(uuid "387bb889-8a39-4cfd-b095-2e3c82a064b7")
+			(effects
+				(font
+					(size 1.27 1.27)
+				)
+				(justify left)
+			)
+		)
+		(pin "~{SDIO_DET}" input
+			(at 228.6 233.68 180)
+			(uuid "eba96f60-e7b5-4ef1-b004-2902c1783fe6")
+			(effects
+				(font
+					(size 1.27 1.27)
+				)
+				(justify left)
+			)
+		)
 		(instances
 			(project "mainboard"
 				(path "/e8df7ad4-0398-46fe-8df2-22f014c5f1dd"