RE: [PATCH v2 1/4] Exynos4 NURI: configure regulators and PMIC
Tushar Behera wrote: On Wednesday 22 June 2011 08:01 AM, MyungJoo Ham wrote: On Tue, Jun 21, 2011 at 2:33 PM, Tushar Beheratushar.beh...@linaro.org wrote: On Tuesday 21 June 2011 07:37 AM, MyungJoo Ham wrote: Signed-off-by: MyungJoo Hammyungjoo@samsung.com Signed-off-by: Kyungmin Parkkyungmin.p...@samsung.com -- Changes from v1. Thanks so much for your valuable comments, Mark. - Removed unnecessary initialization data - Add __initdata where necessary - Corrected a regulator name for ADC --- arch/arm/mach-exynos4/mach-nuri.c | 622 - 1 files changed, 621 insertions(+), 1 deletions(-) Will it be possible to move PMIC specific defines to a common file and make appropriate calls in the board-specific file? In that way, we can re-use this PMIC code on some other boards (e.g. Insignal low-cost board Origen featuring Exynos4210 also features MAX8997). Yes, we have tried creating PMIC defines at a seperated file in our local repositories (still doing so in those repositories). However, that ended up creating multiple PMIC defines (one PMIC define file for each board); the connections between LDO# and devices are different. In that case, we can first post the Origen board support and PMIC code on the ML, then we would see if we can consolidate. That looks more logical as per Mark's suggestion also. Hi Tushar, When you need to add similar or same functionality on your board, you can/should move it in common part. Maybe 'should'...basically, nobody will apply same function into both place... Thanks. Best regards, Kgene. -- Kukjin Kim kgene@samsung.com, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd. -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 1/4] Exynos4 NURI: configure regulators and PMIC
On Tue, Jun 21, 2011 at 11:07:10AM +0900, MyungJoo Ham wrote: Signed-off-by: MyungJoo Ham myungjoo@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com This looks good, though you should also be able to make the supply lists into __initdata. -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 1/4] Exynos4 NURI: configure regulators and PMIC
On Tue, Jun 21, 2011 at 11:03:12AM +0530, Tushar Behera wrote: Will it be possible to move PMIC specific defines to a common file and make appropriate calls in the board-specific file? In that way, we can re-use this PMIC code on some other boards (e.g. Insignal low-cost board Origen featuring Exynos4210 also features MAX8997). If the board is similar enough in design to be sharing the PMIC code that sounds like it should be sharing a lot more of the board setup code. -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 1/4] Exynos4 NURI: configure regulators and PMIC
On Tuesday 21 June 2011 04:40 PM, Mark Brown wrote: On Tue, Jun 21, 2011 at 11:03:12AM +0530, Tushar Behera wrote: Will it be possible to move PMIC specific defines to a common file and make appropriate calls in the board-specific file? In that way, we can re-use this PMIC code on some other boards (e.g. Insignal low-cost board Origen featuring Exynos4210 also features MAX8997). If the board is similar enough in design to be sharing the PMIC code that sounds like it should be sharing a lot more of the board setup code. Origen board details can be found at http://www.origenboard.org/ Under 'Documents' section, there are some schematics for the board. As for other peripherals, I am not sure how much similar this is w.r.t. NURI (I don't have NURI board schematics). -- Tushar Behera -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 1/4] Exynos4 NURI: configure regulators and PMIC
On Tue, Jun 21, 2011 at 05:19:14PM +0530, Tushar Behera wrote: On Tuesday 21 June 2011 04:40 PM, Mark Brown wrote: If the board is similar enough in design to be sharing the PMIC code that sounds like it should be sharing a lot more of the board setup code. Origen board details can be found at http://www.origenboard.org/ Under 'Documents' section, there are some schematics for the board. As for other peripherals, I am not sure how much similar this is w.r.t. NURI (I don't have NURI board schematics). Right, and we can't really make the assessment about sharing the code if we can't do a contrast and compare between the two schematics (or look at the resulting code). -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 1/4] Exynos4 NURI: configure regulators and PMIC
On Wednesday 22 June 2011 08:01 AM, MyungJoo Ham wrote: On Tue, Jun 21, 2011 at 2:33 PM, Tushar Beheratushar.beh...@linaro.org wrote: On Tuesday 21 June 2011 07:37 AM, MyungJoo Ham wrote: Signed-off-by: MyungJoo Hammyungjoo@samsung.com Signed-off-by: Kyungmin Parkkyungmin.p...@samsung.com -- Changes from v1. Thanks so much for your valuable comments, Mark. - Removed unnecessary initialization data - Add __initdata where necessary - Corrected a regulator name for ADC --- arch/arm/mach-exynos4/mach-nuri.c | 622 - 1 files changed, 621 insertions(+), 1 deletions(-) Will it be possible to move PMIC specific defines to a common file and make appropriate calls in the board-specific file? In that way, we can re-use this PMIC code on some other boards (e.g. Insignal low-cost board Origen featuring Exynos4210 also features MAX8997). Yes, we have tried creating PMIC defines at a seperated file in our local repositories (still doing so in those repositories). However, that ended up creating multiple PMIC defines (one PMIC define file for each board); the connections between LDO# and devices are different. In that case, we can first post the Origen board support and PMIC code on the ML, then we would see if we can consolidate. That looks more logical as per Mark's suggestion also. -- Tushar Behera -- Tushar Behera -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 1/4] Exynos4 NURI: configure regulators and PMIC
Signed-off-by: MyungJoo Ham myungjoo@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com -- Changes from v1. Thanks so much for your valuable comments, Mark. - Removed unnecessary initialization data - Add __initdata where necessary - Corrected a regulator name for ADC --- arch/arm/mach-exynos4/mach-nuri.c | 622 - 1 files changed, 621 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-exynos4/mach-nuri.c b/arch/arm/mach-exynos4/mach-nuri.c index 642702b..13b881f 100644 --- a/arch/arm/mach-exynos4/mach-nuri.c +++ b/arch/arm/mach-exynos4/mach-nuri.c @@ -17,6 +17,7 @@ #include linux/gpio.h #include linux/regulator/machine.h #include linux/regulator/fixed.h +#include linux/mfd/max8997.h #include linux/mmc/host.h #include linux/fb.h #include linux/pwm_backlight.h @@ -344,9 +345,624 @@ static void __init nuri_tsp_init(void) s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP); } +static struct regulator_consumer_supply nuri_max8997_ldo1_consumer[] = { + REGULATOR_SUPPLY(vdd, s5p-adc), /* Used by CPU's ADC drv */ +}; +static struct regulator_consumer_supply nuri_max8997_ldo3_consumer[] = { + REGULATOR_SUPPLY(vdd11, s5p-mipi-csis.0), /* MIPI */ +}; +static struct regulator_consumer_supply nuri_max8997_ldo4_consumer[] = { + REGULATOR_SUPPLY(vdd18, s5p-mipi-csis.0), /* MIPI */ +}; +static struct regulator_consumer_supply nuri_max8997_ldo5_consumer[] = { + REGULATOR_SUPPLY(vhsic, modemctl), /* MODEM */ +}; +static struct regulator_consumer_supply nuri_max8997_ldo7_consumer[] = { + REGULATOR_SUPPLY(dig_18, 0-001f), /* HCD803 */ +}; +static struct regulator_consumer_supply nuri_max8997_ldo8_consumer[] = { + REGULATOR_SUPPLY(vusb_d, NULL), /* Used by CPU */ + REGULATOR_SUPPLY(vdac, NULL), /* Used by CPU */ +}; +static struct regulator_consumer_supply nuri_max8997_ldo11_consumer[] = { + REGULATOR_SUPPLY(vcc, platform-lcd), /* U804 LVDS */ +}; +static struct regulator_consumer_supply nuri_max8997_ldo12_consumer[] = { + REGULATOR_SUPPLY(vddio, 6-003c), /* HDC802 */ +}; +static struct regulator_consumer_supply nuri_max8997_ldo13_consumer[] = { + REGULATOR_SUPPLY(vmmc, s3c-sdhci.2), /* TFLASH */ +}; +static struct regulator_consumer_supply nuri_max8997_ldo14_consumer[] = { + REGULATOR_SUPPLY(inmotor, max8997-haptic), +}; +static struct regulator_consumer_supply nuri_max8997_ldo15_consumer[] = { + REGULATOR_SUPPLY(avdd, 3-004a), /* Touch Screen */ +}; +static struct regulator_consumer_supply nuri_max8997_ldo16_consumer[] = { + REGULATOR_SUPPLY(d_sensor, 0-001f), /* HDC803 */ +}; +static struct regulator_consumer_supply nuri_max8997_ldo18_consumer[] = { + REGULATOR_SUPPLY(vdd, 3-004a), /* Touch Screen */ +}; +static struct regulator_consumer_supply nuri_max8997_buck1_consumer[] = { + REGULATOR_SUPPLY(vdd_arm, NULL), /* CPUFREQ */ +}; +static struct regulator_consumer_supply nuri_max8997_buck2_consumer[] = { + REGULATOR_SUPPLY(vdd_int, NULL), /* CPUFREQ */ +}; +static struct regulator_consumer_supply nuri_max8997_buck3_consumer[] = { + REGULATOR_SUPPLY(vdd, mali_dev.0), /* G3D of Exynos 4 */ +}; +static struct regulator_consumer_supply nuri_max8997_buck4_consumer[] = { + REGULATOR_SUPPLY(core, 0-001f), /* HDC803 */ +}; +static struct regulator_consumer_supply nuri_max8997_buck6_consumer[] = { + REGULATOR_SUPPLY(dig_28, 0-001f), /* pin 7 of HDC803 */ +}; +static struct regulator_consumer_supply nuri_max8997_esafeout1_consumer[] = { + REGULATOR_SUPPLY(usb_vbus, NULL), /* CPU's USB OTG */ +}; +static struct regulator_consumer_supply nuri_max8997_esafeout2_consumer[] = { + REGULATOR_SUPPLY(usb_vbus, modemctl), /* VBUS of Modem */ +}; + +static struct regulator_consumer_supply nuri_max8997_charger_consumer[] = { + REGULATOR_SUPPLY(vinchg1, charger-manager.0), +}; +static struct regulator_consumer_supply nuri_max8997_chg_toff_consumer[] = { + REGULATOR_SUPPLY(vinchg_stop, NULL), /* for jack interrupt handlers */ +}; + +static struct regulator_consumer_supply nuri_max8997_32khz_ap_consumer[] = { + REGULATOR_SUPPLY(gps_clk, bcm4751), + REGULATOR_SUPPLY(bt_clk, bcm4330-b1), + REGULATOR_SUPPLY(wifi_clk, bcm433-b1), +}; + +static struct regulator_init_data __initdata nuri_max8997_ldo1_data = { + .constraints= { + .name = VADC_3.3V_C210, + .min_uV = 330, + .max_uV = 330, + .valid_ops_mask = REGULATOR_CHANGE_STATUS, + .apply_uV = 1, + .state_mem = { + .disabled = 1, + }, + }, + .num_consumer_supplies = ARRAY_SIZE(nuri_max8997_ldo1_consumer), + .consumer_supplies = nuri_max8997_ldo1_consumer, +}; + +static struct regulator_init_data __initdata nuri_max8997_ldo2_data = { + .constraints= { +