|
@@ -433,3 +433,90 @@ static unsigned int dns323c_mpp_modes[] __initdata = {
|
|
|
MPP17_GPIO, /* power button LED */
|
|
|
MPP18_GPIO, /* fan speed bit 0 */
|
|
|
MPP19_GPIO, /* fan speed bit 1 */
|
|
|
+ 0,
|
|
|
+};
|
|
|
+
|
|
|
+/* Rev C1 Fan speed notes:
|
|
|
+ *
|
|
|
+ * The fan is controlled by 2 GPIOs on this board. The settings
|
|
|
+ * of the bits is as follow:
|
|
|
+ *
|
|
|
+ * GPIO 18 GPIO 19 Fan
|
|
|
+ *
|
|
|
+ * 0 0 stopped
|
|
|
+ * 0 1 low speed
|
|
|
+ * 1 0 high speed
|
|
|
+ * 1 1 don't do that (*)
|
|
|
+ *
|
|
|
+ * (*) I think the two bits control two feed-in resistors into a fixed
|
|
|
+ * PWN circuit, setting both bits will basically go a 'bit' faster
|
|
|
+ * than high speed, but d-link doesn't do it and you may get out of
|
|
|
+ * HW spec so don't do it.
|
|
|
+ */
|
|
|
+
|
|
|
+/*
|
|
|
+ * On the DNS-323 A1 and B1 the following devices are attached via I2C:
|
|
|
+ *
|
|
|
+ * i2c addr | chip | description
|
|
|
+ * 0x3e | GMT G760Af | fan speed PWM controller
|
|
|
+ * 0x48 | GMT G751-2f | temp. sensor and therm. watchdog (LM75 compatible)
|
|
|
+ * 0x68 | ST M41T80 | RTC w/ alarm
|
|
|
+ */
|
|
|
+static struct i2c_board_info __initdata dns323ab_i2c_devices[] = {
|
|
|
+ {
|
|
|
+ I2C_BOARD_INFO("g760a", 0x3e),
|
|
|
+ }, {
|
|
|
+ I2C_BOARD_INFO("lm75", 0x48),
|
|
|
+ }, {
|
|
|
+ I2C_BOARD_INFO("m41t80", 0x68),
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+/*
|
|
|
+ * On the DNS-323 C1 the following devices are attached via I2C:
|
|
|
+ *
|
|
|
+ * i2c addr | chip | description
|
|
|
+ * 0x48 | GMT G751-2f | temp. sensor and therm. watchdog (LM75 compatible)
|
|
|
+ * 0x68 | ST M41T80 | RTC w/ alarm
|
|
|
+ */
|
|
|
+static struct i2c_board_info __initdata dns323c_i2c_devices[] = {
|
|
|
+ {
|
|
|
+ I2C_BOARD_INFO("lm75", 0x48),
|
|
|
+ }, {
|
|
|
+ I2C_BOARD_INFO("m41t80", 0x68),
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+/* DNS-323 rev. A specific power off method */
|
|
|
+static void dns323a_power_off(void)
|
|
|
+{
|
|
|
+ pr_info("DNS-323: Triggering power-off...\n");
|
|
|
+ gpio_set_value(DNS323_GPIO_POWER_OFF, 1);
|
|
|
+}
|
|
|
+
|
|
|
+/* DNS-323 rev B specific power off method */
|
|
|
+static void dns323b_power_off(void)
|
|
|
+{
|
|
|
+ pr_info("DNS-323: Triggering power-off...\n");
|
|
|
+ /* Pin has to be changed to 1 and back to 0 to do actual power off. */
|
|
|
+ gpio_set_value(DNS323_GPIO_POWER_OFF, 1);
|
|
|
+ mdelay(100);
|
|
|
+ gpio_set_value(DNS323_GPIO_POWER_OFF, 0);
|
|
|
+}
|
|
|
+
|
|
|
+/* DNS-323 rev. C specific power off method */
|
|
|
+static void dns323c_power_off(void)
|
|
|
+{
|
|
|
+ pr_info("DNS-323: Triggering power-off...\n");
|
|
|
+ gpio_set_value(DNS323C_GPIO_POWER_OFF, 1);
|
|
|
+}
|
|
|
+
|
|
|
+static int dns323c_phy_fixup(struct phy_device *phy)
|
|
|
+{
|
|
|
+ phy->dev_flags |= MARVELL_PHY_M1118_DNS323_LEDS;
|
|
|
+
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+static int __init dns323_identify_rev(void)
|
|
|
+{
|