xref: /titanic_44/usr/src/uts/sun4u/chicago/io/ppm.conf (revision fb3fb4f3d76d55b64440afd0af72775dfad3bd1d)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26#pragma ident	"%Z%%M%	%I%	%E% SMI"
27#
28
29name="ppm" parent="pseudo" instance=0;
30
31#
32# ppm configuration format
33#
34# "ppm-domains" - in form of "domain_xxx" where "xxx" string highlights
35# the nature of the domain;
36#
37# "domain_xxx-model" - PM model: CPU, PCI, PCI_PROP, PCIE, FET or LED.
38#
39# "domain_xxx-propname" - a property name that is exported by device in
40# a domain.  Currently, it is used by PCI_PROP model to identify devices
41# that are to have their clocks stopped when all power-manageable devices
42# in the domain are at D3 power level.
43#
44# "domain-xxx-devices" - a list of prom path match patterns to match devices
45# that fall into "domain_xxx", where wildcard '*' is allowed by observing
46# the following expectations:
47#	. a single wildcard with exact match up to (but exclude) the wildcard
48#	  which then terminates the match pattern;
49#	. a single wildcard that does not terminate a match pattern must
50#	  match driver name (followed by '@');
51#	. with two wildcard occurences, the first is to match driver name,
52#	  the second function id, as well as the last character of the match
53#	  pattern.
54#
55# "domain-xxx-ctrl" - blank space separated definitions in the form of
56# keyword=definition [keyword=definition...]
57#    The keywords are as follows, where 'method' must come before mask as it
58#       tells how to store 'mask' and 'val'.  Missing 'val' defaults to 0.
59#
60#    which keywords apply depends on cmd.  There are two sets as shown below.
61#    Here is the first:
62#	cmd=[CPU_GO | LED_ON | LED_OFF | FET_ON | FET_OFF | CLK_ON | CLK_OFF]
63# 	path=<prompath>	- control device's prom pathname (includes minor)
64# 	method=[KIO|I2CKIO]	This selects a method which may be
65#		an ioctl that sets a single value or an i2c ioctl that
66#		takes a value and a mask to access gpio register
67#	iord=<integer> - value of ioctl command for reading
68#	iowr=<integer> - value of ioctl command for writing
69# 	val=<integer>	- a single integer value, generally the value to which
70#			  the relevant bits of a register will be set
71#	mask=<integer>	- which bits of val are relevant (if method is I2CKIO)
72#
73#    Here is the second:
74#	cmd=[CPU_NEXT | PRE_CHNG | POST_CHNG]
75# 	path=<prompath>	   - control device's prom pathname, including minor
76# 	method=[CPUSPEEDKIO | VCORE]  This selects a method that uses
77#			     information like cpu speed index, value for
78#			     adjust cpu core voltage, delays, etc.
79#	iowr=<integer>     - value of ioctl write command
80#	speeds=<integer>   - indicates the number of cpu speeds that are
81#			     supported
82
83ppm-domains="domain_cpu", "domain_diskfet", "domain_led", "domain_pciegfx";
84
85#
86# 0x6a02 is JBPPMIOC_NEXT	(('j' << 8) | 2)
87# 0x6a03 is JBPPMIOC_GO		(('j' << 8) | 3)
88#
89domain_cpu-devices="/SUNW,UltraSPARC-IIIi@*", "/SUNW,UltraSPARC-IIIi+@*";
90domain_cpu-model="CPU";
91domain_cpu-control=
92    "cmd=CPU_NEXT path=/ppm@1f,0:jbus-ppm method=CPUSPEEDKIO iowr=0x6a02 speeds=3",
93    "cmd=CPU_GO path=/ppm@1f,0:jbus-ppm method=KIO iowr=0x6a03 val=0";
94
95#
96# iowr -- 0x4D82 is GPIO_SET_OUTPUT per sys/i2c/clients/i2c_gpio.h file
97# iord -- 0x4D80 is GPIO_GET_INPUT per sys/i2c/clients/i2c_gpio.h file
98# mask -- bit mask for control pin
99# val  -- pin value to set on/off
100# delay -- minimum delay between FET off and FET on
101# post_delay -- delay after turning on/off the FET
102#
103domain_diskfet-devices = "/pci@1e,600000/pci@0/pci@9/pci@0/scsi@1";
104domain_diskfet-model = "FET";
105domain_diskfet-control =
106    "cmd=FET_ON path=/ebus@1f,464000/i2c@3,80/gpio@0,30:pca9556_0 method=I2CKIO iowr=0x4D82 iord=0x4D80 mask=0x0f val=0x0f post_delay=1500000",
107    "cmd=FET_OFF path=/ebus@1f,464000/i2c@3,80/gpio@0,30:pca9556_0 method=I2CKIO iowr=0x4D82 iord=0x4D80 mask=0x0f val=0";
108
109#
110# Manipulate the front-panel LED.  This platform uses ACTIVE low.
111#
112# Note: no devices to claim in this domain
113#
114domain_led-devices = "";
115domain_led-model = "LED";
116domain_led-control =
117    "cmd=LED_ON path=/i2c@1f,530000/gpio@0,30:pca9556_1 method=I2CKIO iowr=0x4D82 iord=0x0 mask=0x01 val=0x01",
118    "cmd=LED_OFF path=/i2c@1f,530000/gpio@0,30:pca9556_1 method=I2CKIO iowr=0x4D82 iord=0x0 mask=0x01 val=0x00";
119
120#
121# PCI Express Primary Graphics Slot (directly attached to root complex(Fire))
122#
123domain_pciegfx-devices = "/pci@1f,700000/*";
124domain_pciegfx-model = "PCIE";
125domain_pciegfx-control =
126    "cmd=PRE_PWR_OFF path=/pci@1f,700000:devctl method=KIO iowr=0x504D0001 val=0x00",
127    "cmd=PRE_PWR_ON path=/pci@1f,700000:devctl method=KIO iowr=0x504D0002 val=0x00",
128    "cmd=POST_PWR_ON path=/pci@1f,700000:devctl method=KIO iowr=0x504D0003 val=0x00 post_delay=100000",
129    "cmd=CLK_OFF path=/i2c@1f,530000/gpio@0,30:pca9556_1 method=I2CKIO iowr=0x4D82 iord=0x0 mask=0x10 val=0x00",
130    "cmd=CLK_ON path=/i2c@1f,530000/gpio@0,30:pca9556_1 method=I2CKIO iowr=0x4D82 iord=0x0 mask=0x10 val=0x10",
131    "cmd=PWR_OFF path=/i2c@1f,530000/gpio@0,30:pca9556_1 method=I2CKIO iowr=0x4D82 iord=0x0 mask=0x08 val=0x00",
132    "cmd=PWR_ON path=/i2c@1f,530000/gpio@0,30:pca9556_1 method=I2CKIO iowr=0x4D82 iord=0x0 mask=0x08 val=0x08",
133    "cmd=RESET_OFF path=/i2c@1f,530000/gpio@0,30:pca9556_1 method=I2CKIO iowr=0x4D82 iord=0x0 mask=0x04 val=0x04 delay=120000",
134    "cmd=RESET_ON path=/i2c@1f,530000/gpio@0,30:pca9556_1 method=I2CKIO iowr=0x4D82 iord=0x0 mask=0x04 val=0x00";
135