summaryrefslogtreecommitdiff
path: root/src/mainboard/kontron/ktqm77/devicetree.cb
blob: bf87661bf8f00a4cdb6542a3fba5671868fb4ac1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
chip northbridge/intel/sandybridge
	# IGD Displays
	register "gfx" = "GMA_STATIC_DISPLAYS(0)"

	chip cpu/intel/model_206ax
		device cpu_cluster 0 on end

		register "acpi_c2" = "CPU_ACPI_C6"
		register "acpi_c3" = "CPU_ACPI_DISABLED"
	end

	device domain 0 on
		device pci 00.0 on end # host bridge
		device pci 01.0 on end # PCIe Bridge x16
		device pci 02.0 on end # vga controller

		chip southbridge/intel/bd82x6x # Intel Series 6 Cougar Point PCH
			# Enable all SATA ports 0-5
			register "sata_port_map" = "0x3f"
			# Set max SATA speed to 6.0 Gb/s (should be the default, anyway)
			register "sata_interface_speed_support" = "0x3"

			# TODO: Enable generic LPC decodes...
			register "gen1_dec" = "0x001c02e1"
			#register "gen2_dec" = "0x00000000"
			#register "gen3_dec" = "0x00000000"
			#register "gen4_dec" = "0x00000000"

			# Disable root port coalescing
			register "pcie_port_coalesce" = "false"

			register "xhci_switchable_ports"	= "0x0f"
			register "superspeed_capable_ports"	= "0x0f"

			device pci 14.0 on end # USB 3.0 Controller
			device pci 16.0 on end # Management Engine Interface 1
			device pci 16.1 off end # Management Engine Interface 2
			device pci 16.2 off end # Management Engine IDE-R
			device pci 16.3 off end # Management Engine KT
			device pci 19.0 on end # Intel Gigabit Ethernet
			device pci 1a.0 on end # USB2 EHCI #2
			device pci 1b.0 on end # High Definition Audio

			# Disabling 1c.0 might break IRQ settings as it enables port coalescing
			# There are two mini PCIe x1 sockets, so one PCIe port is unrouted
			device pci 1c.0 on end # PCIe Port #1 mini PCIe x1?
			device pci 1c.1 on end # PCIe Port #2 mini PCIe x1?
			device pci 1c.2 on end # PCIe Port #3 second Ethernet NIC
			device pci 1c.3 on end # PCIe Port #4 third Ethernet NIC
			device pci 1c.4 on end # PCIe Port #5 first Ethernet PHY
			device pci 1c.5 on end # PCIe Port #6 FireWire
			device pci 1c.6 on end # PCIe Port #7 PCIe x1
			device pci 1c.7 on end # PCIe Port #8 mini PCIe x1?

			device pci 1d.0 on end # USB2 EHCI #1
			device pci 1e.0 off end # PCI bridge
			device pci 1f.0 on #LPC bridge
				chip superio/winbond/w83627dhg
					device pnp 2e.0 off #  Floppy
					end
					device pnp 2e.1 off #  Parallel Port
					end
					device pnp 2e.2 on #  Com1
						io 0x60 = 0x3f8
						irq 0x70 = 4
					end
					device pnp 2e.3 on #  Com2
						io 0x60 = 0x2f8
						irq 0x70 = 3
					end
					device pnp 2e.5 off #  Keyboard
					end
					device pnp 2e.6 off #  SPI
					end
					device pnp 2e.307 off #  GPIO 1
					end
					device pnp 2e.8 off #  WDTO#, PLED
					end
					device pnp 2e.009 on #  GPIO2 -- original firmware sets this on
					end
					device pnp 2e.109 on #  GPIO3 -- original firmware sets this on
					end
					device pnp 2e.209 off #  GPIO4
					end
					device pnp 2e.309 off #  GPIO5
					end
					device pnp 2e.a off #  ACPI
					end
					device pnp 2e.b off # HWM
					end
					device pnp 2e.c off # PECI, SST
					end
				end	#superio/winbond/w83627dhg
				chip ec/kontron/it8516e
					# Set CPU Fan to 50°C, System Fan to 75%
					register "default_fan_mode" = "{ IT8516E_MODE_THERMAL, IT8516E_MODE_PWM }"
					register "default_fan_target" = "{ 50, 75 }"

					# TODO: Check status when Linux runs
					device pnp 20e.1 on #  Com3
						io 0x60 = 0x03e8
						irq 0x70 = 4
					end
					device pnp 20e.2 on #  Com4
						io 0x60 = 0x02e8
						irq 0x70 = 3
					end
					device pnp 20e.4 off #  System Wakeup
					end
					device pnp 20e.5 on #  Mouse
						irq 0x70 = 12
					end
					device pnp 20e.6 on #  Keyboard
						io 0x60 = 0x0060
						io 0x62 = 0x0064
						irq 0x70 = 1
					end
					device pnp 20e.f off #  Shared Memory
					end
					device pnp 20e.10 off #  BRAM / RTC
					end
					device pnp 20e.11 on #  PM channel 1
						io 0x60 = 0x0062
						io 0x62 = 0x0066
						irq 0x70 = 0
					end
					device pnp 20e.12 on #  PM channel 2
						io 0x60 = 0x020c
						io 0x62 = 0x020d
						irq 0x70 = 0
					end
					device pnp 20e.17 off #  PM channel 3
					end
				end	#ec/kontron/it8516e
				# TODO: TPM on 4e
			end # LPC bridge
			device pci 1f.2 on end # SATA Controller 1
			device pci 1f.3 on end # SMBus
			device pci 1f.5 off end # SATA Controller 2
			device pci 1f.6 off end # Thermal
		end
	end
end